diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-13 21:29:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-23 15:20:36 +0300 |
commit | 9cc61e5fbd619eea0401f519e7bac72fe3d4d1e8 (patch) | |
tree | ce3743bdf6965397a8b5129653edc52c1b922cdb /include/linux/device | |
parent | bf6479dbe743ca343fa122aaffbe9dcb1de80a51 (diff) | |
download | linux-9cc61e5fbd619eea0401f519e7bac72fe3d4d1e8.tar.xz |
driver core: bus: move dev_root out of struct bus_type
Now that all accesses of dev_root is through the bus_get_dev_root()
call, move the pointer out of struct bus_type and into the private
dynamic structure, subsys_private.
With this change, there is no modifiable portions of struct bus_type so
it can be marked as a constant structure and moved to read-only memory.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313182918.1312597-22-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device')
-rw-r--r-- | include/linux/device/bus.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index 6ce32ef4b8fd..c258e8770285 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -26,7 +26,6 @@ struct fwnode_handle; * * @name: The name of the bus. * @dev_name: Used for subsystems to enumerate devices like ("foo%u", dev->id). - * @dev_root: Default device to use as the parent. * @bus_groups: Default attributes of the bus. * @dev_groups: Default attributes of the devices on the bus. * @drv_groups: Default attributes of the device drivers on the bus. @@ -82,7 +81,6 @@ struct fwnode_handle; struct bus_type { const char *name; const char *dev_name; - struct device *dev_root; const struct attribute_group **bus_groups; const struct attribute_group **dev_groups; const struct attribute_group **drv_groups; |