Skip to content

Commit 8169ed6

Browse files
rbmarlieremstsirkin
authored andcommitted
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 <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Message-Id: <20240204-bus_cleanup-vdpa-v1-1-1745eccb0a5c@marliere.net> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 56d61ae commit 8169ed6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/vdpa/vdpa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static const struct attribute_group vdpa_dev_group = {
115115
};
116116
__ATTRIBUTE_GROUPS(vdpa_dev);
117117

118-
static struct bus_type vdpa_bus = {
118+
static const struct bus_type vdpa_bus = {
119119
.name = "vdpa",
120120
.dev_groups = vdpa_dev_groups,
121121
.match = vdpa_dev_match,

0 commit comments

Comments
 (0)