From: Sebastian Reichel Date: Fri, 28 Apr 2017 17:27:37 +0000 (-0700) Subject: Input: twl4030-pwrbutton - use input_set_capability() helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=61e29ec1c96f67605217c2a80441a75ff906db62;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Sebastian Reichel Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index 7c4504c31b07..1c13005b228f 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c @@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) return -ENOMEM; } - pwr->evbit[0] = BIT_MASK(EV_KEY); - pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER); + input_set_capability(pwr, EV_KEY, KEY_POWER); pwr->name = "twl4030_pwrbutton"; pwr->phys = "twl4030_pwrbutton/input0"; pwr->dev.parent = &pdev->dev;