keyboard: fixed bug 'report repeatedly wake-up event in suspend'
authorkfx <kfx@rock-chips.com>
Tue, 23 Apr 2013 06:46:43 +0000 (14:46 +0800)
committerkfx <kfx@rock-chips.com>
Tue, 23 Apr 2013 06:46:43 +0000 (14:46 +0800)
drivers/input/keyboard/rk29_keys.c

index eba9f0eb3124f66ca133deae9904bc4b7e67f1f6..28554103017b11c5b1446eb301627775e65408fd 100755 (executable)
@@ -258,13 +258,11 @@ static irqreturn_t keys_isr(int irq, void *dev_id)
        BUG_ON(irq != gpio_to_irq(button->gpio));
 
         if(button->wakeup == 1 && bdata->ddata->in_suspend == true){
+               bdata->state = 1;
                key_dbg(bdata, "wakeup: %skey[%s]: report ev[%d] state[%d]\n", 
                        (button->gpio == INVALID_GPIO)?"ad":"io", button->desc, button->code, bdata->state);
-               input_event(input, type, button->code, 1);
-               input_sync(input);
-               input_event(input, type, button->code, 0);
+               input_event(input, type, button->code, bdata->state);
                input_sync(input);
-               return IRQ_HANDLED;
         }
        bdata->long_press_count = 0;
        mod_timer(&bdata->timer,