mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/4] usb: ohci-ep93xx: use platform_get_irq()
@ 2013-06-29  0:28 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2013-06-29  0:28 UTC (permalink / raw)
  To: Linux Kernel; +Cc: stern, kernel, gregkh

Use platform_get_irq() instead of accessing the platform_device
resources directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/usb/host/ohci-ep93xx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
index 4e12f67..b4f5e64 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;
 
-- 
1.8.1.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-29  0:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-29  0:28 [PATCH 2/4] usb: ohci-ep93xx: use platform_get_irq() H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome