usb: core: constify the struct device_type usage
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 18 Feb 2024 19:18:12 +0000 (16:18 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Feb 2024 08:35:46 +0000 (09:35 +0100)
commit1ab40abcdbb2c409372223060078cc2347df2721
tree18052e590c0fd4e74fb45465680236b52c5e607d
parent3e383260dfd406d8bb09a64cadeafb5cd71a7e0c
usb: core: constify the struct device_type usage

Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
usb_device_type, usb_if_device_type, usb_ep_device_type and
usb_port_device_type variables to be constant structures as well, placing
it into read-only memory which can not be modified at runtime.

Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240218-device_cleanup-usb-v1-4-77423c4da262@marliere.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/endpoint.c
drivers/usb/core/message.c
drivers/usb/core/port.c
drivers/usb/core/usb.c
drivers/usb/core/usb.h