浏览代码

Input: twl4030-pwrbutton - ensure a wakeup event is recorded.

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>
NeilBrown 10 年之前
父节点
当前提交
c42bfd7f6c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/input/misc/twl4030-pwrbutton.c

+ 1 - 0
drivers/input/misc/twl4030-pwrbutton.c

@@ -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;
 }