From: Herve Codina <Herve.CODINA@celad.com>
To: barebox@lists.infradead.org
Cc: Herve Codina <Herve.CODINA@celad.com>
Subject: [PATCH 2/4] exitcall: move device_shutdown to exitcall infrastructure
Date: Mon, 6 Jul 2015 09:36:44 +0200 [thread overview]
Message-ID: <1436168207-6433-3-git-send-email-Herve.CODINA@celad.com> (raw)
In-Reply-To: <1436168207-6433-1-git-send-email-Herve.CODINA@celad.com>
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
---
common/startup.c | 1 -
drivers/base/driver.c | 3 ++-
include/driver.h | 5 -----
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/common/startup.c b/common/startup.c
index 676e435..e9ab248 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 338bea1..943deb4 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 d0cdcc9..d862ed0 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);
--
1.7.9.5
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-07-06 7:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 7:36 [PATCH 0/4] " Herve Codina
2015-07-06 7:36 ` [PATCH 1/4] exitcall: Add " Herve Codina
2015-07-06 7:36 ` Herve Codina [this message]
2015-07-06 7:36 ` [PATCH 3/4] exitcall: move arch_shutdown to " Herve Codina
2015-07-06 7:36 ` [PATCH 4/4] exitcall: move board_shutdown " Herve Codina
2015-07-06 11:52 ` [PATCH 0/4] " Sascha Hauer
2015-07-06 12:19 ` Herve Codina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436168207-6433-3-git-send-email-Herve.CODINA@celad.com \
--to=herve.codina@celad.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox