Commit 8c3ec385 authored by Roger Quadros's avatar Roger Quadros Committed by Greg Kroah-Hartman
Browse files

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: default avatarRoger Quadros <rogerq@ti.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3414211b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;