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

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
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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);