From 80264a8ac4ab878bb0d3ebe7f6552f2203549b78 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 16 Mar 2015 13:06:57 +0100 Subject: 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 --- drivers/base/driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') 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); } } -- cgit v1.2.3