Commit ec762115 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: gpio: use irq-domain lookups

Use irq_find_mapping directly rather than go through the legacy gpio
interface.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 2611ebef
......@@ -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);
......
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