diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2013-07-01 15:52:51 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-26 13:54:29 -0700 |
commit | 8fb35f2d3189f27fe51fb485e9b9751b202d585b (patch) | |
tree | daec5dc4c25fa2d1b53d4a9e8da8e51d15a2a6b0 /drivers | |
parent | 8bd3902d8be2b4ba484d5dbbe0f30b73b2f8c017 (diff) |
usb: ohci-ep93xx: use platform_get_irq()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/ohci-ep93xx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index 4e12f67a32dd..b4f5e6403991 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c @@ -45,12 +45,12 @@ static int usb_hcd_ep93xx_probe(const struct hc_driver *driver, { 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) @@ -80,7 +80,7 @@ static int usb_hcd_ep93xx_probe(const struct hc_driver *driver, 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; |