aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/driver.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-01 16:31:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:16 -0500
commit6dcec2511ff55b4abaca7ad3433011a7c04c2430 (patch)
treeaeb9c18a877987478a1594d42b8f041ebb388875 /drivers/base/driver.c
parent3d8995963dfec66ef6270e729bf75903e9043f9d (diff)
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>
Diffstat (limited to 'drivers/base/driver.c')
-rw-r--r--drivers/base/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index eb11475293ed..1c9770dfb801 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -185,7 +185,7 @@ void driver_unregister(struct device_driver * drv)
185 */ 185 */
186struct device_driver *driver_find(const char *name, struct bus_type *bus) 186struct device_driver *driver_find(const char *name, struct bus_type *bus)
187{ 187{
188 struct kobject *k = kset_find_obj(&bus->drivers, name); 188 struct kobject *k = kset_find_obj(bus->drivers_kset, name);
189 if (k) 189 if (k)
190 return to_drv(k); 190 return to_drv(k);
191 return NULL; 191 return NULL;