mirror of https://gitee.com/openkylin/linux.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 <andreas@gaisler.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
d9a6ef1bb2
commit
196800da39
|
@ -2108,20 +2108,22 @@ static int gr_probe(struct platform_device *pdev)
|
||||||
if (IS_ERR(regs))
|
if (IS_ERR(regs))
|
||||||
return PTR_ERR(regs);
|
return PTR_ERR(regs);
|
||||||
|
|
||||||
dev->irq = irq_of_parse_and_map(dev->dev->of_node, 0);
|
dev->irq = platform_get_irq(pdev, 0);
|
||||||
if (!dev->irq) {
|
if (dev->irq <= 0) {
|
||||||
dev_err(dev->dev, "No irq found\n");
|
dev_err(dev->dev, "No irq found\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some core configurations has separate irqs for IN and OUT events */
|
/* Some core configurations has separate irqs for IN and OUT events */
|
||||||
dev->irqi = irq_of_parse_and_map(dev->dev->of_node, 1);
|
dev->irqi = platform_get_irq(pdev, 1);
|
||||||
if (dev->irqi) {
|
if (dev->irqi > 0) {
|
||||||
dev->irqo = irq_of_parse_and_map(dev->dev->of_node, 2);
|
dev->irqo = platform_get_irq(pdev, 2);
|
||||||
if (!dev->irqo) {
|
if (dev->irqo <= 0) {
|
||||||
dev_err(dev->dev, "Found irqi but not irqo\n");
|
dev_err(dev->dev, "Found irqi but not irqo\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dev->irqi = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->gadget.name = driver_name;
|
dev->gadget.name = driver_name;
|
||||||
|
|
Loading…
Reference in New Issue