kset: convert struct bus_device->drivers to use kset_create
Dynamically create the kset instead of declaring it statically. Having 3 static kobjects in one structure is not only foolish, but ripe for nasty race conditions if handled improperly. We also rename the field to catch any potential users of it (not that there should be outside of the driver core...) Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
3d8995963d
commit
6dcec2511f
3 changed files with 10 additions and 9 deletions
|
@ -54,7 +54,7 @@ struct bus_type {
|
|||
struct module * owner;
|
||||
|
||||
struct kset subsys;
|
||||
struct kset drivers;
|
||||
struct kset *drivers_kset;
|
||||
struct kset *devices_kset;
|
||||
struct klist klist_devices;
|
||||
struct klist klist_drivers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue