driver core: bus: move dev_root out of struct bus_type
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2023 18:29:04 +0000 (19:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2023 12:20:36 +0000 (13:20 +0100)
commit9cc61e5fbd619eea0401f519e7bac72fe3d4d1e8
treece3743bdf6965397a8b5129653edc52c1b922cdb
parentbf6479dbe743ca343fa122aaffbe9dcb1de80a51
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>
drivers/base/base.h
drivers/base/bus.c
include/linux/device/bus.h