diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-08 12:13:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-09 10:43:37 +0100 |
commit | d2bf38c088e0d5467a0e8a2055d6f95dff5c2125 (patch) | |
tree | 717758ce8ceb1c427042142804713ce98ce243c3 /drivers/base/bus.c | |
parent | 63b823d7d3cd275c3347233f95bdf966a595dbc8 (diff) |
driver core: remove private pointer from struct bus_type
Now that the driver code has been refactored to not rely on the pointer
from a struct bus_type to the private structure it can be safely removed
from the structure entirely.
This will allow most bus_type structures to now be marked as const.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230208111330.439504-18-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index c82c65fde8a1..719cd3a1354c 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -205,11 +205,9 @@ EXPORT_SYMBOL_GPL(bus_remove_file); static void bus_release(struct kobject *kobj) { struct subsys_private *priv = to_subsys_private(kobj); - struct bus_type *bus = priv->bus; lockdep_unregister_key(&priv->lock_key); kfree(priv); - bus->p = NULL; } static const struct kobj_type bus_ktype = { @@ -854,7 +852,6 @@ int bus_register(struct bus_type *bus) return -ENOMEM; priv->bus = bus; - bus->p = priv; BLOCKING_INIT_NOTIFIER_HEAD(&priv->bus_notifier); @@ -917,7 +914,6 @@ bus_uevent_fail: kset_unregister(&priv->subsys); out: kfree(priv); - bus->p = NULL; return retval; } EXPORT_SYMBOL_GPL(bus_register); |