aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/sonypi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/sonypi.c')
-rw-r--r--drivers/char/sonypi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index a4873684f22c..f86c15587238 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1167,19 +1167,17 @@ static int sonypi_disable(void)
1167#ifdef CONFIG_PM 1167#ifdef CONFIG_PM
1168static int old_camera_power; 1168static int old_camera_power;
1169 1169
1170static int sonypi_suspend(struct device *dev, pm_message_t state, u32 level) 1170static int sonypi_suspend(struct device *dev, pm_message_t state)
1171{ 1171{
1172 if (level == SUSPEND_DISABLE) { 1172 old_camera_power = sonypi_device.camera_power;
1173 old_camera_power = sonypi_device.camera_power; 1173 sonypi_disable();
1174 sonypi_disable(); 1174
1175 }
1176 return 0; 1175 return 0;
1177} 1176}
1178 1177
1179static int sonypi_resume(struct device *dev, u32 level) 1178static int sonypi_resume(struct device *dev)
1180{ 1179{
1181 if (level == RESUME_ENABLE) 1180 sonypi_enable(old_camera_power);
1182 sonypi_enable(old_camera_power);
1183 return 0; 1181 return 0;
1184} 1182}
1185#endif 1183#endif