mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
virtio: make virtio_bus const
Now that the driver core can properly handle constant struct bus_type, move the virtio_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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Jason Wang <[email protected]>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
8169ed6220
commit
2b666ee296
@@ -353,7 +353,7 @@ static void virtio_dev_remove(struct device *_d)
|
||||
of_node_put(dev->dev.of_node);
|
||||
}
|
||||
|
||||
static struct bus_type virtio_bus = {
|
||||
static const struct bus_type virtio_bus = {
|
||||
.name = "virtio",
|
||||
.match = virtio_dev_match,
|
||||
.dev_groups = virtio_dev_groups,
|
||||
|
||||
Reference in New Issue
Block a user