Skip to content

Commit 61e29ec

Browse files
sredtor
authored andcommitted
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 3071e9d commit 61e29ec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/input/misc/twl4030-pwrbutton.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
6464
return -ENOMEM;
6565
}
6666

67-
pwr->evbit[0] = BIT_MASK(EV_KEY);
68-
pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
67+
input_set_capability(pwr, EV_KEY, KEY_POWER);
6968
pwr->name = "twl4030_pwrbutton";
7069
pwr->phys = "twl4030_pwrbutton/input0";
7170
pwr->dev.parent = &pdev->dev;

0 commit comments

Comments
 (0)