drivers: misc: therm_est: Fixed factory reset issue
Hyungwoo Yang [Wed, 10 Jul 2013 02:14:04 +0000 (19:14 -0700)]
Thermal Estimator tries to access device no more usable during factory reset.

Bug 1320678

Change-Id: Ic56f550c029ad5b9d9a117ad79ccf5bd03292f86
Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com>
Reviewed-on: http://git-master/r/246962
(cherry picked from commit e06ae462d514f61f28d5fd7f82d927bbeb0c8607)
Reviewed-on: http://git-master/r/248508
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

drivers/misc/therm_est.c

index 699c8ce..51bfb7f 100644 (file)
@@ -1046,6 +1046,11 @@ static int __devexit therm_est_remove(struct platform_device *pdev)
        return 0;
 }
 
+static void __devexit therm_est_shutdown(struct platform_device *pdev)
+{
+       therm_est_remove(pdev);
+}
+
 static struct platform_driver therm_est_driver = {
        .driver = {
                .owner = THIS_MODULE,
@@ -1053,6 +1058,7 @@ static struct platform_driver therm_est_driver = {
        },
        .probe  = therm_est_probe,
        .remove = __devexit_p(therm_est_remove),
+       .shutdown = __devexit_p(therm_est_shutdown),
 };
 
 static int __init therm_est_driver_init(void)