mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 05:33:09 +00:00
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>
This commit is contained in:
parent
8bd3902d8b
commit
8fb35f2d31
@ -45,12 +45,12 @@ static int usb_hcd_ep93xx_probe(const struct hc_driver *driver,
|
|||||||
{
|
{
|
||||||
struct usb_hcd *hcd;
|
struct usb_hcd *hcd;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
int irq;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
if (pdev->resource[1].flags != IORESOURCE_IRQ) {
|
irq = platform_get_irq(pdev, 0);
|
||||||
dev_dbg(&pdev->dev, "resource[1] is not IORESOURCE_IRQ\n");
|
if (irq < 0)
|
||||||
return -ENOMEM;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res)
|
if (!res)
|
||||||
@ -80,7 +80,7 @@ static int usb_hcd_ep93xx_probe(const struct hc_driver *driver,
|
|||||||
|
|
||||||
ohci_hcd_init(hcd_to_ohci(hcd));
|
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)
|
if (retval == 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user