diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-19 13:45:50 +0100 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-02-26 08:15:49 +0100 |
commit | b8a730836c6b1788ca2fbd6bcc2ac99e97ef7de9 (patch) | |
tree | d460f6ec9f82f622109955a2f78303a0b4f6ecd5 /drivers/thunderbolt/domain.c | |
parent | thunderbolt: Add trace events support for the control channel (diff) | |
download | linux-b8a730836c6b1788ca2fbd6bcc2ac99e97ef7de9.tar.xz linux-b8a730836c6b1788ca2fbd6bcc2ac99e97ef7de9.zip |
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 'drivers/thunderbolt/domain.c')
-rw-r--r-- | drivers/thunderbolt/domain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c index 1d915a6c61a4..0023017299f7 100644 --- a/drivers/thunderbolt/domain.c +++ b/drivers/thunderbolt/domain.c @@ -326,7 +326,7 @@ static void tb_domain_release(struct device *dev) kfree(tb); } -struct device_type tb_domain_type = { +const struct device_type tb_domain_type = { .name = "thunderbolt_domain", .release = tb_domain_release, }; |