Input: twl4030-pwrbutton - ensure a wakeup event is recorded.
authorNeilBrown <neilb@suse.de>
Fri, 7 Nov 2014 23:46:56 +0000 (15:46 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 8 Nov 2014 08:26:44 +0000 (00:26 -0800)
This button is treated as a wakeup source, so we need to initialise it
correctly.

Without the device_init_wakeup() call, dev->power.wakeup will
be NULL, and pm_wakeup_event() will do nothing.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/twl4030-pwrbutton.c

index fb3b63b2f85c3615619452ef9ee2e6f0528d8245..8400a1a34d87569a5d81febffb75e97d91365ee5 100644 (file)
@@ -85,6 +85,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
        }
 
        platform_set_drvdata(pdev, pwr);
+       device_init_wakeup(&pdev->dev, true);
 
        return 0;
 }