aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.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/input/serio/i8042.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/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 40d451ce07ff..4bc40f159996 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -911,12 +911,10 @@ static long i8042_panic_blink(long count)
911 * Here we try to restore the original BIOS settings 911 * Here we try to restore the original BIOS settings
912 */ 912 */
913 913
914static int i8042_suspend(struct device *dev, pm_message_t state, u32 level) 914static int i8042_suspend(struct device *dev, pm_message_t state)
915{ 915{
916 if (level == SUSPEND_DISABLE) { 916 del_timer_sync(&i8042_timer);
917 del_timer_sync(&i8042_timer); 917 i8042_controller_reset();
918 i8042_controller_reset();
919 }
920 918
921 return 0; 919 return 0;
922} 920}
@@ -926,13 +924,10 @@ static int i8042_suspend(struct device *dev, pm_message_t state, u32 level)
926 * Here we try to reset everything back to a state in which suspended 924 * Here we try to reset everything back to a state in which suspended
927 */ 925 */
928 926
929static int i8042_resume(struct device *dev, u32 level) 927static int i8042_resume(struct device *dev)
930{ 928{
931 int i; 929 int i;
932 930
933 if (level != RESUME_ENABLE)
934 return 0;
935
936 if (i8042_ctl_test()) 931 if (i8042_ctl_test())
937 return -1; 932 return -1;
938 933