driver: Call bus->remove instead of driver->remove
In devices_shutdown we should call the busses remove function which in turn calls the drivers remove function. Otherwise for example PCI devices never get removed since they do not have a remove function but a pcidev->remove function instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
e0899dfa3b
commit
80264a8ac4
|
@ -399,8 +399,8 @@ void devices_shutdown(void)
|
|||
struct device_d *dev;
|
||||
|
||||
list_for_each_entry(dev, &active, active) {
|
||||
if (dev->driver->remove)
|
||||
dev->driver->remove(dev);
|
||||
if (dev->bus->remove)
|
||||
dev->bus->remove(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue