Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] driver core: restore event order for device_add()

As a result of the split of the kobject-registration and the
corresponding hotplug event, the order of events for device_add() has
changed. This restores the old order, cause it confused some userspace
applications.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Kay Sievers and committed by
Linus Torvalds
187a1a94 ab3fc403

+2 -2
+2 -2
drivers/base/core.c
··· 245 245 246 246 if ((error = kobject_add(&dev->kobj))) 247 247 goto Error; 248 + kobject_hotplug(&dev->kobj, KOBJ_ADD); 248 249 if ((error = device_pm_add(dev))) 249 250 goto PMError; 250 251 if ((error = bus_add_device(dev))) ··· 258 257 /* notify platform of device entry */ 259 258 if (platform_notify) 260 259 platform_notify(dev); 261 - 262 - kobject_hotplug(&dev->kobj, KOBJ_ADD); 263 260 Done: 264 261 put_device(dev); 265 262 return error; 266 263 BusError: 267 264 device_pm_remove(dev); 268 265 PMError: 266 + kobject_hotplug(&dev->kobj, KOBJ_REMOVE); 269 267 kobject_del(&dev->kobj); 270 268 Error: 271 269 if (parent)