From: Andreas Larsson Date: Thu, 27 Mar 2014 15:15:55 +0000 (+0100) Subject: usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=196800da39a142e2952ad5e1cb58a84838956764;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index ae5bebe98b2d..7a992546335d 100644 --- a/drivers/usb/gadget/gr_udc.c +++ b/drivers/usb/gadget/gr_udc.c @@ -2108,20 +2108,22 @@ static int gr_probe(struct platform_device *pdev) if (IS_ERR(regs)) return PTR_ERR(regs); - dev->irq = irq_of_parse_and_map(dev->dev->of_node, 0); - if (!dev->irq) { + dev->irq = platform_get_irq(pdev, 0); + if (dev->irq <= 0) { dev_err(dev->dev, "No irq found\n"); return -ENODEV; } /* Some core configurations has separate irqs for IN and OUT events */ - dev->irqi = irq_of_parse_and_map(dev->dev->of_node, 1); - if (dev->irqi) { - dev->irqo = irq_of_parse_and_map(dev->dev->of_node, 2); - if (!dev->irqo) { + dev->irqi = platform_get_irq(pdev, 1); + if (dev->irqi > 0) { + dev->irqo = platform_get_irq(pdev, 2); + if (dev->irqo <= 0) { dev_err(dev->dev, "Found irqi but not irqo\n"); return -ENODEV; } + } else { + dev->irqi = 0; } dev->gadget.name = driver_name;