aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/sonypi.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2005-10-28 12:52:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 12:52:56 -0400
commit9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch)
tree967e26d3a23c24dd52b114d672312c207714308c /drivers/char/sonypi.c
parenta3a3395e487abc4c1371fe319a8ecbb3913a70a4 (diff)
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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