summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-03-16 13:06:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-17 07:24:55 +0100
commit80264a8ac4ab878bb0d3ebe7f6552f2203549b78 (patch)
treec0f3410d49ff82e55e0241857c5c2563fc893baf /drivers
parente0899dfa3b15886d35280199e2dbd2d7810bf8b5 (diff)
downloadbarebox-80264a8ac4ab878bb0d3ebe7f6552f2203549b78.tar.gz
barebox-80264a8ac4ab878bb0d3ebe7f6552f2203549b78.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 453966b84f..590c97c964 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -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);
}
}