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
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...
*/