From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] devices_shutdown: move remove call to bus
Date: Thu, 10 Feb 2011 04:32:00 +0100 [thread overview]
Message-ID: <1297308720-26390-4-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1297308720-26390-1-git-send-email-plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2011-02-10 3:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 3:31 [PATCH 1/4] bus: remove dead code Jean-Christophe PLAGNIOL-VILLARD
2011-02-10 3:31 ` [PATCH 2/4] bus/driver: move from lib to drivers/base Jean-Christophe PLAGNIOL-VILLARD
2011-02-10 3:31 ` [PATCH 3/4] driver/memmap: fix generic_memmap_rw and generic_memmap_ro Jean-Christophe PLAGNIOL-VILLARD
2011-02-10 7:12 ` Sascha Hauer
2011-02-10 11:50 ` Jean-Christophe PLAGNIOL-VILLARD
2011-02-10 12:01 ` Sascha Hauer
2011-02-10 3:32 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=1297308720-26390-4-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.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