diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-19 09:45:50 -0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-02-26 09:15:49 +0200 |
commit | b8a730836c6b1788ca2fbd6bcc2ac99e97ef7de9 (patch) | |
tree | d460f6ec9f82f622109955a2f78303a0b4f6ecd5 /include/linux/thunderbolt.h | |
parent | a0c45b0b6ce23bc1cd6737ecd34df6c4a422a3ae (diff) |
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>
Diffstat (limited to 'include/linux/thunderbolt.h')
-rw-r--r-- | include/linux/thunderbolt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h index 2c835e5c41f6..4338ea9ac4fd 100644 --- a/include/linux/thunderbolt.h +++ b/include/linux/thunderbolt.h @@ -87,8 +87,8 @@ struct tb { }; extern const struct bus_type tb_bus_type; -extern struct device_type tb_service_type; -extern struct device_type tb_xdomain_type; +extern const struct device_type tb_service_type; +extern const struct device_type tb_xdomain_type; #define TB_LINKS_PER_PHY_PORT 2 |