Commit 0f631d87 authored by Russell King's avatar Russell King Committed by Dmitry Torokhov

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: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a8a7bdc5
...@@ -217,9 +217,15 @@ static struct platform_device jornada_ssp_device = { ...@@ -217,9 +217,15 @@ static struct platform_device jornada_ssp_device = {
.id = -1, .id = -1,
}; };
static struct resource jornada_kbd_resources[] = {
DEFINE_RES_IRQ(IRQ_GPIO0),
};
static struct platform_device jornada_kbd_device = { static struct platform_device jornada_kbd_device = {
.name = "jornada720_kbd", .name = "jornada720_kbd",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(jornada_kbd_resources),
.resource = jornada_kbd_resources,
}; };
static struct platform_device jornada_ts_device = { static struct platform_device jornada_ts_device = {
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <mach/jornada720.h> #include <mach/jornada720.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/irqs.h>
MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>");
MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver");
...@@ -97,7 +96,11 @@ static int jornada720_kbd_probe(struct platform_device *pdev) ...@@ -97,7 +96,11 @@ static int jornada720_kbd_probe(struct platform_device *pdev)
{ {
struct jornadakbd *jornadakbd; struct jornadakbd *jornadakbd;
struct input_dev *input_dev; 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); jornadakbd = devm_kzalloc(&pdev->dev, sizeof(*jornadakbd), GFP_KERNEL);
input_dev = devm_input_allocate_device(&pdev->dev); input_dev = devm_input_allocate_device(&pdev->dev);
...@@ -125,10 +128,10 @@ static int jornada720_kbd_probe(struct platform_device *pdev) ...@@ -125,10 +128,10 @@ static int jornada720_kbd_probe(struct platform_device *pdev)
input_set_capability(input_dev, EV_MSC, MSC_SCAN); 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); IRQF_TRIGGER_FALLING, "jornadakbd", pdev);
if (err) { 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; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment