diff options
author | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-04-28 10:27:37 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-05-01 09:29:08 -0700 |
commit | 61e29ec1c96f67605217c2a80441a75ff906db62 (patch) | |
tree | a5ec33b0dbde53249a64c7eccdad02d19b773e54 /drivers/input/misc/twl4030-pwrbutton.c | |
parent | 3071e9dd6cd3f2290d770117330f2c8b2e9a97e4 (diff) | |
download | linux-stable-61e29ec1c96f67605217c2a80441a75ff906db62.tar.gz linux-stable-61e29ec1c96f67605217c2a80441a75ff906db62.tar.bz2 linux-stable-61e29ec1c96f67605217c2a80441a75ff906db62.zip |
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 <sebastian.reichel@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/twl4030-pwrbutton.c')
-rw-r--r-- | drivers/input/misc/twl4030-pwrbutton.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; |