9
0
Fork 0

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:
Sascha Hauer 2015-03-16 13:06:57 +01:00
parent e0899dfa3b
commit 80264a8ac4
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}