* [PATCH] devres: release resources on device_del()
@ 2007-03-09 10:34 Tejun Heo
2007-03-09 10:36 ` Tejun Heo
2007-03-09 12:51 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2007-03-09 10:34 UTC (permalink / raw)
To: gregkh, Jeff Garzik, linux-kernel, linux-ide
Some platform devices are driven without driver attached, so managed
resources can be acquired without driver attached. Make sure such
resources are released by calling devres_release_all() in
device_del().
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
This one fixes oops on pata_platform and pata_legacy unload. libata
being the only user of devres at the moment. I think this can go
through libata-dev#upstream.
drivers/base/core.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index cf2a398..89ebe36 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -787,6 +787,13 @@ void device_del(struct device * dev)
device_remove_attrs(dev);
bus_remove_device(dev);
+ /*
+ * Some platform devices are driven without driver attached
+ * and managed resources may have been acquired. Make sure
+ * all resources are released.
+ */
+ devres_release_all(dev);
+
/* Notify the platform of the removal, in case they
* need to do anything...
*/
--
1.5.0.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-09 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09 10:34 [PATCH] devres: release resources on device_del() Tejun Heo
2007-03-09 10:36 ` Tejun Heo
2007-03-09 12:51 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).