diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-03 21:11:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-17 19:30:30 +0300 |
commit | e1f97d7ef608962de2206a8899c6f18dc4f36fdc (patch) | |
tree | ce919756386aa3618d8affa1262cc3cad81e92e7 /drivers/staging | |
parent | cfd87832dfa1b69069d3e6c598044a5568e1a1ef (diff) | |
download | linux-e1f97d7ef608962de2206a8899c6f18dc4f36fdc.tar.xz |
staging: fieldbus: make anybus_bus const
Now that the driver core can properly handle constant struct bus_type,
move the anybus_bus variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240203-bus_cleanup-staging-v1-1-a13448ddb4c7@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/fieldbus/anybuss/host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fieldbus/anybuss/host.c b/drivers/staging/fieldbus/anybuss/host.c index cd86b9c9e345..410e6f8073c0 100644 --- a/drivers/staging/fieldbus/anybuss/host.c +++ b/drivers/staging/fieldbus/anybuss/host.c @@ -1195,7 +1195,7 @@ static void anybus_bus_remove(struct device *dev) adrv->remove(to_anybuss_client(dev)); } -static struct bus_type anybus_bus = { +static const struct bus_type anybus_bus = { .name = "anybuss", .match = anybus_bus_match, .probe = anybus_bus_probe, |