Thread (29 messages) 29 messages, 7 authors, 2016-08-10
STALE3599d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 08/20] usb: host: ehci-sead3: Remove non-DT probe code

From: Paul Burton <hidden>
Date: 2016-08-09 12:38:12
Also in: lkml
Subsystem: the rest, usb ehci driver, usb subsystem · Maintainers: Linus Torvalds, Alan Stern, Greg Kroah-Hartman

Now that the SEAD3 board is probing the EHCI controller using device
tree, remove the non-DT support from the probe function.

Signed-off-by: Paul Burton <redacted>
---

 drivers/usb/host/ehci-sead3.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/host/ehci-sead3.c b/drivers/usb/host/ehci-sead3.c
index 05db1ae..b88ecfe 100644
--- a/drivers/usb/host/ehci-sead3.c
+++ b/drivers/usb/host/ehci-sead3.c
@@ -102,18 +102,10 @@ static int ehci_hcd_sead3_drv_probe(struct platform_device *pdev)
 	if (usb_disabled())
 		return -ENODEV;
 
-	if (pdev->dev.of_node) {
-		irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
-		if (!irq) {
-			dev_err(&pdev->dev, "failed to map IRQ\n");
-			return -ENODEV;
-		}
-	} else {
-		if (pdev->resource[1].flags != IORESOURCE_IRQ) {
-			pr_debug("resource[1] is not IORESOURCE_IRQ");
-			return -ENOMEM;
-		}
-		irq = pdev->resource[1].start;
+	irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
+	if (!irq) {
+		dev_err(&pdev->dev, "failed to map IRQ\n");
+		return -ENODEV;
 	}
 
 	hcd = usb_create_hcd(&ehci_sead3_hc_driver, &pdev->dev, "SEAD-3");
-- 
2.9.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help