提交 61e29ec1 编写于 作者: S Sebastian Reichel 提交者: Dmitry Torokhov

Input: twl4030-pwrbutton - use input_set_capability() helper

Cleanup driver slightly by using input_set_capability() instead
of manually setting the required bits.
Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 3071e9dd
...@@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) ...@@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
pwr->evbit[0] = BIT_MASK(EV_KEY); input_set_capability(pwr, EV_KEY, KEY_POWER);
pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
pwr->name = "twl4030_pwrbutton"; pwr->name = "twl4030_pwrbutton";
pwr->phys = "twl4030_pwrbutton/input0"; pwr->phys = "twl4030_pwrbutton/input0";
pwr->dev.parent = &pdev->dev; pwr->dev.parent = &pdev->dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册