aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArve Hjønnevåg2012-03-21 18:43:45 -0500
committerArve Hjønnevåg2012-03-21 19:31:29 -0500
commit6c3978c3f224e6b40ff9c981aae3c29a08e4ff4f (patch)
treedd39fdd8fcbd1d55b248e760280094ed352614e3
parent59c75bcf603f355ff34282422e8c3f2165b9d5f2 (diff)
downloadkernel-common-android-3.3.tar.gz
kernel-common-android-3.3.tar.xz
kernel-common-android-3.3.zip
Fix 3.3 merge error in: drivers: power: Add watchdog timer to catch drivers which lockup during suspend.android-3.3
__device_suspend could return with an active timer on the stack Change-Id: I113f5f9aa12f909cb46621b6744e02a104ddd2bd Signed-off-by: Arve Hjønnevåg <arve@android.com>
-rw-r--r--drivers/base/power/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 070ef58cc58..0d4212c9864 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -850,14 +850,6 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
850 850
851 dpm_wait_for_children(dev, async); 851 dpm_wait_for_children(dev, async);
852 852
853 data.dev = dev;
854 data.tsk = get_current();
855 init_timer_on_stack(&timer);
856 timer.expires = jiffies + HZ * 12;
857 timer.function = dpm_drv_timeout;
858 timer.data = (unsigned long)&data;
859 add_timer(&timer);
860
861 if (async_error) 853 if (async_error)
862 return 0; 854 return 0;
863 855
@@ -871,6 +863,14 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
871 return 0; 863 return 0;
872 } 864 }
873 865
866 data.dev = dev;
867 data.tsk = get_current();
868 init_timer_on_stack(&timer);
869 timer.expires = jiffies + HZ * 12;
870 timer.function = dpm_drv_timeout;
871 timer.data = (unsigned long)&data;
872 add_timer(&timer);
873
874 device_lock(dev); 874 device_lock(dev);
875 875
876 if (dev->pm_domain) { 876 if (dev->pm_domain) {