mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
thunderbolt: make tb_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the tb_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Andreas Noever <andreas.noever@gmail.com> Cc: Michael Jamet <michael.jamet@intel.com> Cc: Yehezkel Bernat <YehezkelShB@gmail.com> Cc: <linux-usb@vger.kernel.org> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://lore.kernel.org/r/2023121904-utopia-broadcast-06d1@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e9158c7e55
commit
8be0c877fb
|
|
@ -307,7 +307,7 @@ static const struct attribute_group *domain_attr_groups[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
struct bus_type tb_bus_type = {
|
||||
const struct bus_type tb_bus_type = {
|
||||
.name = "thunderbolt",
|
||||
.match = tb_service_match,
|
||||
.probe = tb_service_probe,
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ struct tb {
|
|||
unsigned long privdata[];
|
||||
};
|
||||
|
||||
extern struct bus_type tb_bus_type;
|
||||
extern const struct bus_type tb_bus_type;
|
||||
extern struct device_type tb_service_type;
|
||||
extern struct device_type tb_xdomain_type;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user