From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932692Ab3CLKrh (ORCPT ); Tue, 12 Mar 2013 06:47:37 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:36984 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755397Ab3CLKpT (ORCPT ); Tue, 12 Mar 2013 06:45:19 -0400 From: Roger Quadros To: CC: , , , , , , , , Subject: [PATCH 07/12] USB: ehci-omap: Get platform resources by index rather than by name Date: Tue, 12 Mar 2013 12:44:45 +0200 Message-ID: <1363085090-24676-8-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1363085090-24676-1-git-send-email-rogerq@ti.com> References: <1363085090-24676-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/usb/host/ehci-omap.c | 5 ++--- 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); -- 1.7.4.1