[PATCH 3/3] driver: Call bus->remove instead of driver->remove
Sascha Hauer
s.hauer at pengutronix.de
Mon Mar 16 23:25:54 PDT 2015
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 at pengutronix.de>
---
drivers/base/driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 453966b..590c97c 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);
}
}
--
2.1.4
More information about the barebox
mailing list