diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2009-12-30 02:16:28 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-30 02:20:49 -0500 |
commit | 70f944139084c4f297ac90b3af4cb67a8a68b2cf (patch) | |
tree | bf67fd9a7136da8764dcaa3d47392ef8fe518e27 /drivers/input | |
parent | 3f58061d0160424d244e3a72258a1366ab4a8547 (diff) |
Input: twl4030-pwrbutton - switch to using threaded IRQ
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/twl4030-pwrbutton.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index bdde5c889035..e9069b87fde2 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c | |||
@@ -39,18 +39,8 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr) | |||
39 | int err; | 39 | int err; |
40 | u8 value; | 40 | u8 value; |
41 | 41 | ||
42 | #ifdef CONFIG_LOCKDEP | ||
43 | /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which | ||
44 | * we don't want and can't tolerate since this is a threaded | ||
45 | * IRQ and can sleep due to the i2c reads it has to issue. | ||
46 | * Although it might be friendlier not to borrow this thread | ||
47 | * context... | ||
48 | */ | ||
49 | local_irq_enable(); | ||
50 | #endif | ||
51 | |||
52 | err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value, | 42 | err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value, |
53 | STS_HW_CONDITIONS); | 43 | STS_HW_CONDITIONS); |
54 | if (!err) { | 44 | if (!err) { |
55 | input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ); | 45 | input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ); |
56 | input_sync(pwr); | 46 | input_sync(pwr); |
@@ -80,7 +70,7 @@ static int __devinit twl4030_pwrbutton_probe(struct platform_device *pdev) | |||
80 | pwr->phys = "twl4030_pwrbutton/input0"; | 70 | pwr->phys = "twl4030_pwrbutton/input0"; |
81 | pwr->dev.parent = &pdev->dev; | 71 | pwr->dev.parent = &pdev->dev; |
82 | 72 | ||
83 | err = request_irq(irq, powerbutton_irq, | 73 | err = request_threaded_irq(irq, NULL, powerbutton_irq, |
84 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | 74 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
85 | "twl4030_pwrbutton", pwr); | 75 | "twl4030_pwrbutton", pwr); |
86 | if (err < 0) { | 76 | if (err < 0) { |