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().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by Tejun Heo and committed by Jeff Garzik 2f8d16a9 1aa506e4

+7
+7
drivers/base/core.c
··· 787 device_remove_attrs(dev); 788 bus_remove_device(dev); 789 790 /* Notify the platform of the removal, in case they 791 * need to do anything... 792 */
··· 787 device_remove_attrs(dev); 788 bus_remove_device(dev); 789 790 + /* 791 + * Some platform devices are driven without driver attached 792 + * and managed resources may have been acquired. Make sure 793 + * all resources are released. 794 + */ 795 + devres_release_all(dev); 796 + 797 /* Notify the platform of the removal, in case they 798 * need to do anything... 799 */