]> git.karo-electronics.de Git - linux-beck.git/commitdiff
USB: ohci-omap3: Get platform resources by index rather than by name
authorRoger Quadros <rogerq@ti.com>
Tue, 12 Mar 2013 10:44:46 +0000 (12:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 18:51:46 +0000 (11:51 -0700)
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>
drivers/usb/host/ohci-omap3.c

index eb35d96302373c7e9e2fa3345f7d81008aa802f9..5ed28c5af759f688f9319939443336ab153c190a 100644 (file)
@@ -141,14 +141,13 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       irq = platform_get_irq_byname(pdev, "ohci-irq");
+       irq = platform_get_irq(pdev, 0);
        if (irq < 0) {
                dev_err(dev, "OHCI irq failed\n");
                return -ENODEV;
        }
 
-       res = platform_get_resource_byname(pdev,
-                               IORESOURCE_MEM, "ohci");
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res) {
                dev_err(dev, "UHH OHCI get resource failed\n");
                return -ENOMEM;