提交 8c3ec385 编写于 作者: R Roger Quadros 提交者: Greg Kroah-Hartman

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: NRoger Quadros <rogerq@ti.com>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3414211b
...@@ -141,14 +141,13 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev) ...@@ -141,14 +141,13 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
} }
irq = platform_get_irq_byname(pdev, "ohci-irq"); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0) {
dev_err(dev, "OHCI irq failed\n"); dev_err(dev, "OHCI irq failed\n");
return -ENODEV; return -ENODEV;
} }
res = platform_get_resource_byname(pdev, res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
IORESOURCE_MEM, "ohci");
if (!res) { if (!res) {
dev_err(dev, "UHH OHCI get resource failed\n"); dev_err(dev, "UHH OHCI get resource failed\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册