Commit 78655197 authored by Russell King's avatar Russell King Committed by Greg Kroah-Hartman

usb: ohci-sa1111: use sa1111_get_irq() to obtain IRQ resources

Use the provided sa1111_get_irq() to fetch the IRQ resources for the
SA1111 OHCI driver.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0a4c005b
...@@ -178,7 +178,7 @@ static void sa1111_stop_hc(struct sa1111_dev *dev) ...@@ -178,7 +178,7 @@ static void sa1111_stop_hc(struct sa1111_dev *dev)
static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev) static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev)
{ {
struct usb_hcd *hcd; struct usb_hcd *hcd;
int ret; int ret, irq;
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
...@@ -196,6 +196,12 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev) ...@@ -196,6 +196,12 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev)
hcd->rsrc_start = dev->res.start; hcd->rsrc_start = dev->res.start;
hcd->rsrc_len = resource_size(&dev->res); hcd->rsrc_len = resource_size(&dev->res);
irq = sa1111_get_irq(dev, 1);
if (irq <= 0) {
ret = irq ? : -ENXIO;
goto err1;
}
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
dev_dbg(&dev->dev, "request_mem_region failed\n"); dev_dbg(&dev->dev, "request_mem_region failed\n");
ret = -EBUSY; ret = -EBUSY;
...@@ -208,7 +214,7 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev) ...@@ -208,7 +214,7 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev)
if (ret) if (ret)
goto err2; goto err2;
ret = usb_add_hcd(hcd, dev->irq[1], 0); ret = usb_add_hcd(hcd, irq, 0);
if (ret == 0) { if (ret == 0) {
device_wakeup_enable(hcd->self.controller); device_wakeup_enable(hcd->self.controller);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment