diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2012-07-04 16:02:56 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-04 16:12:19 -0400 |
| commit | 9b7e31bbf4bb58b12e11a7f24b7c3e48bbd2f4da (patch) | |
| tree | ca55c470f22dbccb53f3c3ed4683342cbd92c515 /drivers/input/joystick | |
| parent | 1cecc5cc0658e128bcad0b29edb96f286066571d (diff) | |
Input: request threaded-only IRQs with IRQF_ONESHOT
Since commit 1c6c69525b ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail. This patch adds the
IRQF_ONESHOT to input drivers where it is missing. Not modified by
this patch are those drivers where the requested IRQ will always be a
nested IRQ (e.g. because it's part of an MFD), since for this special
case IRQF_ONESHOT is not required to be specified when requesting the
IRQ.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/joystick')
| -rw-r--r-- | drivers/input/joystick/as5011.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index 3063464474bf..feeefcb09e78 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c | |||
| @@ -281,7 +281,8 @@ static int __devinit as5011_probe(struct i2c_client *client, | |||
| 281 | 281 | ||
| 282 | error = request_threaded_irq(as5011->button_irq, | 282 | error = request_threaded_irq(as5011->button_irq, |
| 283 | NULL, as5011_button_interrupt, | 283 | NULL, as5011_button_interrupt, |
| 284 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 284 | IRQF_TRIGGER_RISING | |
| 285 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, | ||
| 285 | "as5011_button", as5011); | 286 | "as5011_button", as5011); |
| 286 | if (error < 0) { | 287 | if (error < 0) { |
| 287 | dev_err(&client->dev, | 288 | dev_err(&client->dev, |
| @@ -295,7 +296,7 @@ static int __devinit as5011_probe(struct i2c_client *client, | |||
| 295 | 296 | ||
| 296 | error = request_threaded_irq(as5011->axis_irq, NULL, | 297 | error = request_threaded_irq(as5011->axis_irq, NULL, |
| 297 | as5011_axis_interrupt, | 298 | as5011_axis_interrupt, |
| 298 | plat_data->axis_irqflags, | 299 | plat_data->axis_irqflags | IRQF_ONESHOT, |
| 299 | "as5011_joystick", as5011); | 300 | "as5011_joystick", as5011); |
| 300 | if (error) { | 301 | if (error) { |
| 301 | dev_err(&client->dev, | 302 | dev_err(&client->dev, |
