diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-05-26 15:29:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-05-26 15:25:17 -0700 |
commit | ec762115a5006db8549b3582f7f19849f7cf4ab4 (patch) | |
tree | b29a7877a7ce7b18d6161b1dd4dba2c06f3da8ec /drivers/staging/greybus/gpio.c | |
parent | 2611ebef8322fc12dc3c6b0ec869f1902aa25626 (diff) | |
download | linux-stable-ec762115a5006db8549b3582f7f19849f7cf4ab4.tar.gz linux-stable-ec762115a5006db8549b3582f7f19849f7cf4ab4.tar.bz2 linux-stable-ec762115a5006db8549b3582f7f19849f7cf4ab4.zip |
greybus: gpio: use irq-domain lookups
Use irq_find_mapping directly rather than go through the legacy gpio
interface.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/gpio.c')
-rw-r--r-- | drivers/staging/greybus/gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c index 526dd7e73a2f..15cc0ea4e3a5 100644 --- a/drivers/staging/greybus/gpio.c +++ b/drivers/staging/greybus/gpio.c @@ -303,9 +303,9 @@ static int gb_gpio_request_recv(u8 type, struct gb_operation *op) return -EINVAL; } - irq = gpio_to_irq(ggc->chip.base + event->which); - if (irq < 0) { - dev_err(ggc->chip.dev, "failed to map irq\n"); + irq = irq_find_mapping(ggc->irqdomain, event->which); + if (!irq) { + dev_err(ggc->chip.dev, "failed to find IRQ\n"); return -EINVAL; } desc = irq_to_desc(irq); |