diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-13 21:29:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-23 15:22:00 +0300 |
commit | 9d11b13402d1b80f7f3ca5061d75f15cf8002555 (patch) | |
tree | a03887881199fc63e4847f6c2f5ec5c43963455a /drivers/usb/typec/bus.c | |
parent | d492cc2573a08352c48a66d3e3f312a15fb3f363 (diff) | |
download | linux-9d11b13402d1b80f7f3ca5061d75f15cf8002555.tar.xz |
USB: mark all struct bus_type as const
Now that the driver core can properly handle constant struct bus_type,
move all of the USB subsystem struct bus_type structures as const,
placing them into read-only memory which can not be modified at runtime.
Cc: Johan Hovold <johan@kernel.org>
Cc: Evan Green <evgreen@chromium.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230313182918.1312597-36-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/bus.c')
-rw-r--r-- | drivers/usb/typec/bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/bus.c b/drivers/usb/typec/bus.c index 098f0efaa58d..fe5b9a2e61f5 100644 --- a/drivers/usb/typec/bus.c +++ b/drivers/usb/typec/bus.c @@ -431,7 +431,7 @@ static void typec_remove(struct device *dev) adev->ops = NULL; } -struct bus_type typec_bus = { +const struct bus_type typec_bus = { .name = "typec", .dev_groups = typec_groups, .match = typec_match, |