diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-01 09:33:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-01 20:03:18 +0100 |
commit | 37e98d9bedb50644654fd196e38acad49903fadc (patch) | |
tree | ba0d7e0436daa67195830d5cd5c095e0c3d65bd3 /drivers/base/base.h | |
parent | 40b3880dc29b89c39139eba11eba2b3107dc2e38 (diff) |
driver core: bus: move lock_class_key into dynamic structure
Move the lock_class_key structure out of struct bus_type and into the
dynamic structure we create already for all bus_types registered with
the kernel. This saves on static space and removes one more writable
field in struct bus_type.
In the future, the same field can be moved out of the struct class logic
because it shares this same private structure.
Most everyone will never notice this change, as lockdep is not enabled
in real systems so no memory or logic changes are happening for them.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230201083349.4038660-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r-- | drivers/base/base.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h index 2208af509ce8..0e806f641079 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -52,6 +52,8 @@ struct subsys_private { struct kset glue_dirs; struct class *class; + + struct lock_class_key lock_key; }; #define to_subsys_private(obj) container_of_const(obj, struct subsys_private, subsys.kobj) |