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:
parent
e35ca87a95
commit
4c2ff06f31
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user