Skip to content

Commit

Permalink
USB: ehci-omap: Get platform resources by index rather than by name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roger Quadros authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent dfdf9ad commit 3414211
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/usb/host/ehci-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3414211

Please sign in to comment.