Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.

In patch a1a2b7125e10 (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: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Suggested-by: Rob Herring <robh@kernel.org>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Darren Stevens <darren@stevens-zone.net>
Link: https://lore.kernel.org/r/20220702220355.63b36fb8@Cyrus.lan
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Darren Stevens and committed by
Greg Kroah-Hartman
bb160ee6 3d0dc539

+6 -8
+3 -8
drivers/usb/host/ehci-fsl.c
··· 76 76 return -ENODEV; 77 77 } 78 78 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; 87 82 88 83 hcd = __usb_create_hcd(&fsl_ehci_hc_driver, pdev->dev.parent, 89 84 &pdev->dev, dev_name(&pdev->dev), NULL);
+3
drivers/usb/host/fsl-mph-dr-of.c
··· 112 112 goto error; 113 113 } 114 114 115 + pdev->dev.of_node = ofdev->dev.of_node; 116 + pdev->dev.of_node_reused = true; 117 + 115 118 retval = platform_device_add(pdev); 116 119 if (retval) 117 120 goto error;