Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> --- drivers/base/driver.c | 4 ++-- drivers/base/platform.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/base/driver.c b/drivers/base/driver.c index bd7464e..6ad61f7 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -259,8 +259,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); } } diff --git a/drivers/base/platform.c b/drivers/base/platform.c index f1ee38c..e0a83b9 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -34,7 +34,8 @@ static int platform_probe(struct device_d *dev) static void platform_remove(struct device_d *dev) { - dev->driver->remove(dev); + if (dev->driver->remove) + dev->driver->remove(dev); } struct bus_type platform_bus = { -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox