diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-08 14:13:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-09 12:43:07 +0300 |
commit | 273afac615adccf97bd4e70ebfb27074f1ff22b9 (patch) | |
tree | 1625597d52c9e18ac1570579f22a8b973215f711 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 789be03a600842ef461968cc5a2d458f51f319b2 (diff) | |
download | linux-273afac615adccf97bd4e70ebfb27074f1ff22b9.tar.xz |
driver core: bus: implement bus_get/put() without the private pointer
In the quest to make 'struct bus_type' constant and in read-only memory,
we need to stop using the private pointer to the subsys_private
structure. First step in doing this is to create a helper function that
turns a 'struct bus_type' into 'struct subsys_private' called
bus_to_subsys().
bus_to_subsys() walks the list of registered busses in the system and
finds the matching one based on the pointer to the bus_type itself. As
this is a short list, and this function is not on any fast path, it
should not be noticable.
Implement bus_get() and bus_put() using this new helper function.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230208111330.439504-3-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions