From: Roger Quadros Date: Tue, 12 Mar 2013 10:44:46 +0000 (+0200) Subject: USB: ohci-omap3: Get platform resources by index rather than by name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c3ec38550a6b880738c8b1982f9207d0fd5a339;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: ohci-omap3: 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index eb35d9630237..5ed28c5af759 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c @@ -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;