summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 10:17:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 10:17:02 -0700
commit93db6294958f62643a917e44d1abc85440e600cf (patch)
tree33de2c41b0f70d209d64487d1a2bba6d673015ef /drivers/input/serio/i8042.c
parent43813f399c72aa22e01a680559c1cb5274bf2140 (diff)
parenteef3e4cab72eaf5345e3c73b2975c194a714f6cd (diff)
downloadkernel-crypto-93db6294958f62643a917e44d1abc85440e600cf.tar.gz
kernel-crypto-93db6294958f62643a917e44d1abc85440e600cf.tar.xz
kernel-crypto-93db6294958f62643a917e44d1abc85440e600cf.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits) Input: add driver for Synaptics I2C touchpad Input: synaptics - add support for reporting x/y resolution Input: ALPS - handle touchpoints buttons correctly Input: gpio-keys - change timer to workqueue Input: ads7846 - pin change interrupt support Input: add support for touchscreen on W90P910 ARM platform Input: appletouch - improve finger detection Input: wacom - clear Intuos4 wheel data when finger leaves proximity Input: ucb1400 - move static function from header into core Input: add driver for EETI touchpanels Input: ads7846 - more detailed model name in sysfs Input: ads7846 - support swapping x and y axes Input: ati_remote2 - use non-atomic bitops Input: introduce lm8323 keypad driver Input: psmouse - ESD workaround fix for OLPC XO touchpad Input: tsc2007 - make sure platform provides get_pendown_state() Input: uinput - flush all pending ff effects before destroying device Input: simplify name handling for certain input handles Input: serio - do not use deprecated dev.power.power_state Input: wacom - add support for Intuos4 tablets ...
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 3cffb704e37..f919bf57293 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -10,6 +10,7 @@
* the Free Software Foundation.
*/
+#include <linux/types.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/interrupt.h>
@@ -921,6 +922,9 @@ static void i8042_dritek_enable(void)
#endif
#ifdef CONFIG_PM
+
+static bool i8042_suspended;
+
/*
* Here we try to restore the original BIOS settings. We only want to
* do that once, when we really suspend, not when we taking memory
@@ -930,11 +934,9 @@ static void i8042_dritek_enable(void)
static int i8042_suspend(struct platform_device *dev, pm_message_t state)
{
- if (dev->dev.power.power_state.event != state.event) {
- if (state.event == PM_EVENT_SUSPEND)
- i8042_controller_reset();
-
- dev->dev.power.power_state = state;
+ if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) {
+ i8042_controller_reset();
+ i8042_suspended = true;
}
return 0;
@@ -952,7 +954,7 @@ static int i8042_resume(struct platform_device *dev)
/*
* Do not bother with restoring state if we haven't suspened yet
*/
- if (dev->dev.power.power_state.event == PM_EVENT_ON)
+ if (!i8042_suspended)
return 0;
error = i8042_controller_check();
@@ -998,10 +1000,9 @@ static int i8042_resume(struct platform_device *dev)
if (i8042_ports[I8042_KBD_PORT_NO].serio)
i8042_enable_kbd_port();
+ i8042_suspended = false;
i8042_interrupt(0, NULL);
- dev->dev.power.power_state = PMSG_ON;
-
return 0;
}
#endif /* CONFIG_PM */