]> git.neil.brown.name Git - history.git/commit
Fix and prevent bugs in device_register()
authorPatrick Mochel <mochel@osdl.org>
Tue, 13 Aug 2002 05:14:33 +0000 (22:14 -0700)
committerPatrick Mochel <mochel@osdl.org>
Tue, 13 Aug 2002 05:14:33 +0000 (22:14 -0700)
commit266c24ad83baf7d2c9873d5c289fe0126fb90c68
treeeffafe5071f18327bcbe54d7947d2335a42caafb
parentd8b2993cbe5e4a58038e65a2d99b7b396281ba9f
Fix and prevent bugs in device_register()

When adding to the global device list, we were adding devices just after their parent, while we wanted to
add them just before. That way when we iterate over the list on suspend and shutdown, we'll hit all
children before the parents.

Make sure dev->driver_list and dev->bus_list are initialized when the device is registered

Remove device from global and parent's list if registration failed.
drivers/base/core.c