thunderbolt: Constify the struct device_type usage
authorRicardo B. Marliere <ricardo@marliere.net>
Mon, 19 Feb 2024 12:45:50 +0000 (09:45 -0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 26 Feb 2024 07:15:49 +0000 (09:15 +0200)
commitb8a730836c6b1788ca2fbd6bcc2ac99e97ef7de9
treed460f6ec9f82f622109955a2f78303a0b4f6ecd5
parenta0c45b0b6ce23bc1cd6737ecd34df6c4a422a3ae
thunderbolt: 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
tb_domain_type, tb_retimer_type, tb_switch_type, usb4_port_device_type,
tb_service_type and tb_xdomain_type variables to be constant structures as
well, placing it into read-only memory which can not be modified at
runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/domain.c
drivers/thunderbolt/retimer.c
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/usb4_port.c
drivers/thunderbolt/xdomain.c
include/linux/thunderbolt.h