9
0
Fork 0

fix silly bug in unregister_device(). When unregistering devices

we have to compare the device pointers and not the names.
This commit is contained in:
Sascha Hauer 2007-07-14 15:36:49 +02:00
parent 8dc7fe1648
commit b449ef7374
1 changed files with 2 additions and 2 deletions

View File

@ -125,12 +125,12 @@ void unregister_device(struct device_d *old_dev)
{
struct device_d *dev;
debug("unregister_device: %s\n",old_dev->name);
debug("unregister_device: %s:%s\n",old_dev->name, old_dev->id);
dev = first_device;
while (dev) {
if (!strcmp(dev->next->name, old_dev->name)) {
if (dev->next == old_dev) {
if (old_dev->driver)
old_dev->driver->remove(old_dev);
dev->next = old_dev->next;