Use platform_get_irq() instead of accessing the platform_device
resources directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 {
        struct usb_hcd *hcd;
        struct resource *res;
+       int irq;
        int retval;
 
-       if (pdev->resource[1].flags != IORESOURCE_IRQ) {
-               dev_dbg(&pdev->dev, "resource[1] is not IORESOURCE_IRQ\n");
-               return -ENOMEM;
-       }
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0)
+               return irq;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res)
 
        ohci_hcd_init(hcd_to_ohci(hcd));
 
-       retval = usb_add_hcd(hcd, pdev->resource[1].start, 0);
+       retval = usb_add_hcd(hcd, irq, 0);
        if (retval == 0)
                return retval;