summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2013-03-12 10:44:45 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 18:51:46 (GMT)
commit3414211b914464113ba3cd19726e44b5e416087d (patch)
tree433396038ec9302f97f772cddccf16e0bcc359d8
parentdfdf9ad92aa90d2a5de732dbd5e23bb17501ac67 (diff)
downloadlinux-3414211b914464113ba3cd19726e44b5e416087d.tar.xz
USB: ehci-omap: Get platform resources by index rather than by name
Since there is only one resource per type we don't really need to use resource name to obtain it. This also also makes it easier for device tree adaptation. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/ehci-omap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 57fe985..7d05cce 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -148,14 +148,13 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
return -ENODEV;
}
- irq = platform_get_irq_byname(pdev, "ehci-irq");
+ irq = platform_get_irq(pdev, 0);
if (irq < 0) {
dev_err(dev, "EHCI irq failed\n");
return -ENODEV;
}
- res = platform_get_resource_byname(pdev,
- IORESOURCE_MEM, "ehci");
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
regs = devm_ioremap_resource(dev, res);
if (IS_ERR(regs))
return PTR_ERR(regs);