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>
This commit is contained in:
Johan Hovold 2015-05-26 15:29:22 +02:00 committed by Greg Kroah-Hartman
parent 2611ebef83
commit ec762115a5

View File

@ -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);