diff options
| author | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-01-21 02:09:30 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-01-21 02:12:01 -0500 |
| commit | 94a8cab8caaa56824981c17b6898b73627e8382f (patch) | |
| tree | f8619429a56b28c1a1d8a57085a2ed05ab929bbc | |
| parent | 48c27016e18f8608c12b7516515ad773093198d8 (diff) | |
Input: gpio_keys - switch to using request_any_context_irq
The driver does not require hardirq context and can work with threaded
interrupts as well, so let's switch to request_any_context_irq which
will select the context that is available for us.
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| -rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 6069abe31e4..eb3006361ee 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
| @@ -322,7 +322,7 @@ static void gpio_keys_report_event(struct gpio_button_data *bdata) | |||
| 322 | struct gpio_keys_button *button = bdata->button; | 322 | struct gpio_keys_button *button = bdata->button; |
| 323 | struct input_dev *input = bdata->input; | 323 | struct input_dev *input = bdata->input; |
| 324 | unsigned int type = button->type ?: EV_KEY; | 324 | unsigned int type = button->type ?: EV_KEY; |
| 325 | int state = (gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low; | 325 | int state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^ button->active_low; |
| 326 | 326 | ||
| 327 | input_event(input, type, button->code, !!state); | 327 | input_event(input, type, button->code, !!state); |
| 328 | input_sync(input); | 328 | input_sync(input); |
| @@ -410,8 +410,8 @@ static int __devinit gpio_keys_setup_key(struct platform_device *pdev, | |||
| 410 | if (!button->can_disable) | 410 | if (!button->can_disable) |
| 411 | irqflags |= IRQF_SHARED; | 411 | irqflags |= IRQF_SHARED; |
| 412 | 412 | ||
| 413 | error = request_irq(irq, gpio_keys_isr, irqflags, desc, bdata); | 413 | error = request_any_context_irq(irq, gpio_keys_isr, irqflags, desc, bdata); |
| 414 | if (error) { | 414 | if (error < 0) { |
| 415 | dev_err(dev, "Unable to claim irq %d; error %d\n", | 415 | dev_err(dev, "Unable to claim irq %d; error %d\n", |
| 416 | irq, error); | 416 | irq, error); |
| 417 | goto fail3; | 417 | goto fail3; |
