summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/startup.c1
-rw-r--r--drivers/base/driver.c3
-rw-r--r--include/driver.h5
3 files changed, 2 insertions, 7 deletions
diff --git a/common/startup.c b/common/startup.c
index 45d8d86aee..0e5de63ffc 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -151,7 +151,6 @@ void shutdown_barebox(void)
(*exitcall)();
}
- devices_shutdown();
#ifdef ARCH_SHUTDOWN
arch_shutdown();
#endif
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 338bea1280..943deb489c 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -459,7 +459,7 @@ const char *dev_id(const struct device_d *dev)
return buf;
}
-void devices_shutdown(void)
+static void devices_shutdown(void)
{
struct device_d *dev;
@@ -468,6 +468,7 @@ void devices_shutdown(void)
dev->bus->remove(dev);
}
}
+devshutdown_exitcall(devices_shutdown);
int dev_get_drvdata(struct device_d *dev, const void **data)
{
diff --git a/include/driver.h b/include/driver.h
index 9c6005454c..728f8abb49 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -339,11 +339,6 @@ int mem_memmap(struct cdev *cdev, void **map, int flags);
/* Use this if you have nothing to do in your drivers probe function */
int dummy_probe(struct device_d *);
-/* Iterate over all activated devices (i.e. the ones with drivers and shut
- * them down.
- */
-void devices_shutdown(void);
-
int generic_memmap_ro(struct cdev *dev, void **map, int flags);
int generic_memmap_rw(struct cdev *dev, void **map, int flags);