diff options
author | R Raj Kumar <rrajk@nvidia.com> | 2013-12-04 12:01:29 +0530 |
---|---|---|
committer | R Raj Kumar <rrajk@nvidia.com> | 2013-12-08 20:24:56 -0800 |
commit | 2fb25ac7fcdd5adfb42c53496124b375bc08b0e8 (patch) | |
tree | 65a1e7e6c7dbafbe4682680f5e343c21631c05a9 /drivers/base | |
parent | b22ad1051d88f2042c45654ca2bebd04e60df980 (diff) |
devres: release resources on device_del()
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().
Bug 1393856
Change-Id: I1e43647e143bdb363b939b97c77b4a508f281e7c
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/338117
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/base')
-rw-r--r-- | 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 ca4bcb8b3938..88bd6b57a62f 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1243,6 +1243,13 @@ void device_del(struct device *dev) device_pm_remove(dev); driver_deferred_probe_del(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... */ |