summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/bus.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-13 19:29:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-23 13:22:00 +0100
commit9d11b13402d1b80f7f3ca5061d75f15cf8002555 (patch)
treea03887881199fc63e4847f6c2f5ec5c43963455a /drivers/usb/typec/bus.h
parentd492cc2573a08352c48a66d3e3f312a15fb3f363 (diff)
downloadlinux-9d11b13402d1b80f7f3ca5061d75f15cf8002555.tar.gz
linux-9d11b13402d1b80f7f3ca5061d75f15cf8002555.tar.bz2
linux-9d11b13402d1b80f7f3ca5061d75f15cf8002555.zip
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.h')
-rw-r--r--drivers/usb/typec/bus.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/bus.h b/drivers/usb/typec/bus.h
index c89168857417..643b8c81786d 100644
--- a/drivers/usb/typec/bus.h
+++ b/drivers/usb/typec/bus.h
@@ -28,7 +28,7 @@ struct altmode {
#define to_altmode(d) container_of(d, struct altmode, adev)
-extern struct bus_type typec_bus;
+extern const struct bus_type typec_bus;
extern const struct device_type typec_altmode_dev_type;
#define is_typec_altmode(_dev_) (_dev_->type == &typec_altmode_dev_type)