input: do not wake up if we are not asleep

Check for state == INPUT_AWAKE before performing wakeup.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-03-24 12:27:25 +01:00
parent e35ca87a95
commit 4c2ff06f31

View File

@ -637,7 +637,7 @@ void kmscon_input_sleep(struct kmscon_input *input)
{
struct kmscon_input_device *iter;
if (!input)
if (!input || input->state == INPUT_ASLEEP)
return;
for (iter = input->devices; iter; iter = iter->next)
@ -651,7 +651,7 @@ void kmscon_input_wake_up(struct kmscon_input *input)
struct kmscon_input_device *iter, *prev, *tmp;
int ret;
if (!input)
if (!input || input->state == INPUT_AWAKE)
return;
prev = NULL;