From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 20:50:45 +0000 (-0300) Subject: vdpa: make vdpa_bus const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8169ed622060035ba6b5b8c10388dfc9a31f1c98;p=linux.git vdpa: make vdpa_bus const Now that the driver core can properly handle constant struct bus_type, move the vdpa_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Message-Id: <20240204-bus_cleanup-vdpa-v1-1-1745eccb0a5c@marliere.net> Signed-off-by: Michael S. Tsirkin Reviewed-by: Greg Kroah-Hartman --- diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c index d0695680b282e..c73c06102e7e1 100644 --- a/drivers/vdpa/vdpa.c +++ b/drivers/vdpa/vdpa.c @@ -115,7 +115,7 @@ static const struct attribute_group vdpa_dev_group = { }; __ATTRIBUTE_GROUPS(vdpa_dev); -static struct bus_type vdpa_bus = { +static const struct bus_type vdpa_bus = { .name = "vdpa", .dev_groups = vdpa_dev_groups, .match = vdpa_dev_match,