Skip to content

Commit bb160ee

Browse files
Darren Stevensgregkh
authored andcommitted
drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.
In patch a1a2b71 (Drop static setup of IRQ resource from DT core) we stopped platform_get_resource() from returning the IRQ, as all drivers were supposed to have switched to platform_get_irq() Unfortunately the Freescale EHCI driver in host mode got missed. Fix it. Fixes: a1a2b71 ("of/platform: Drop static setup of IRQ resource from DT core") Reported-by: Christian Zigotzky <[email protected]> Suggested-by: Rob Herring <[email protected]> Tested-by: Christian Zigotzky <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Darren Stevens <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3d0dc53 commit bb160ee

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

drivers/usb/host/ehci-fsl.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,9 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
7676
return -ENODEV;
7777
}
7878

79-
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
80-
if (!res) {
81-
dev_err(&pdev->dev,
82-
"Found HC with no IRQ. Check %s setup!\n",
83-
dev_name(&pdev->dev));
84-
return -ENODEV;
85-
}
86-
irq = res->start;
79+
irq = platform_get_irq(pdev, 0);
80+
if (irq < 0)
81+
return irq;
8782

8883
hcd = __usb_create_hcd(&fsl_ehci_hc_driver, pdev->dev.parent,
8984
&pdev->dev, dev_name(&pdev->dev), NULL);

drivers/usb/host/fsl-mph-dr-of.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ static struct platform_device *fsl_usb2_device_register(
112112
goto error;
113113
}
114114

115+
pdev->dev.of_node = ofdev->dev.of_node;
116+
pdev->dev.of_node_reused = true;
117+
115118
retval = platform_device_add(pdev);
116119
if (retval)
117120
goto error;

0 commit comments

Comments
 (0)