summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/twl4030-pwrbutton.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc/twl4030-pwrbutton.c')
-rw-r--r--drivers/input/misc/twl4030-pwrbutton.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 54162d2cbcfc..1c13005b228f 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -64,13 +64,12 @@ 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;
- err = devm_request_threaded_irq(&pwr->dev, irq, NULL, powerbutton_irq,
+ err = devm_request_threaded_irq(&pdev->dev, irq, NULL, powerbutton_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
"twl4030_pwrbutton", pwr);