From: Johan Hovold Date: Tue, 26 May 2015 13:29:22 +0000 (+0200) Subject: greybus: gpio: use irq-domain lookups X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1518^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ec762115a5006db8549b3582f7f19849f7cf4ab4;p=karo-tx-linux.git greybus: gpio: use irq-domain lookups Use irq_find_mapping directly rather than go through the legacy gpio interface. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- 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);