diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-08-19 19:41:47 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-08-23 00:17:17 +0300 |
commit | 0f631d87d9a5e3f5f22908b102c8eaad944f390e (patch) | |
tree | 974b33ba2b94438224ee526657dff11560b9d2cb /drivers/input | |
parent | a8a7bdc598ec0c355491bc1cac75f8f6b8a1740d (diff) | |
download | linux-0f631d87d9a5e3f5f22908b102c8eaad944f390e.tar.xz |
Input: jornada720_kbd - get rid of mach/irqs.h include
Switch the jornada720 keyboard driver to obtain its interrupt from the
platform device, rather than via a hard-coded interrupt number obtained
from the mach/irqs.h header.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/jornada720_kbd.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c index 0a7832e0e05a..648340439d5f 100644 --- a/drivers/input/keyboard/jornada720_kbd.c +++ b/drivers/input/keyboard/jornada720_kbd.c @@ -26,7 +26,6 @@ #include <mach/jornada720.h> #include <mach/hardware.h> -#include <mach/irqs.h> MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); @@ -97,7 +96,11 @@ static int jornada720_kbd_probe(struct platform_device *pdev) { struct jornadakbd *jornadakbd; struct input_dev *input_dev; - int i, err; + int i, err, irq; + + irq = platform_get_irq(pdev, 0); + if (irq <= 0) + return irq < 0 ? irq : -EINVAL; jornadakbd = devm_kzalloc(&pdev->dev, sizeof(*jornadakbd), GFP_KERNEL); input_dev = devm_input_allocate_device(&pdev->dev); @@ -125,10 +128,10 @@ static int jornada720_kbd_probe(struct platform_device *pdev) input_set_capability(input_dev, EV_MSC, MSC_SCAN); - err = devm_request_irq(&pdev->dev, IRQ_GPIO0, jornada720_kbd_interrupt, + err = devm_request_irq(&pdev->dev, irq, jornada720_kbd_interrupt, IRQF_TRIGGER_FALLING, "jornadakbd", pdev); if (err) { - printk(KERN_INFO "jornadakbd720_kbd: Unable to grab IRQ\n"); + dev_err(&pdev->dev, "unable to grab IRQ%d: %d\n", irq, err); return err; } |