Commit bb160ee6 authored by Darren Stevens's avatar Darren Stevens Committed by Greg Kroah-Hartman
Browse files

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



In patch a1a2b712 (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: a1a2b712 ("of/platform: Drop static setup of IRQ resource from DT core")
Reported-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Suggested-by: default avatarRob Herring <robh@kernel.org>
Tested-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Acked-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarDarren Stevens <darren@stevens-zone.net>
Link: https://lore.kernel.org/r/20220702220355.63b36fb8@Cyrus.lan


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3d0dc539
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -76,14 +76,9 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
	if (!res) {
		dev_err(&pdev->dev,
			"Found HC with no IRQ. Check %s setup!\n",
			dev_name(&pdev->dev));
		return -ENODEV;
	}
	irq = res->start;
	irq = platform_get_irq(pdev, 0);
	if (irq < 0)
		return irq;

	hcd = __usb_create_hcd(&fsl_ehci_hc_driver, pdev->dev.parent,
			       &pdev->dev, dev_name(&pdev->dev), NULL);
+3 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ static struct platform_device *fsl_usb2_device_register(
			goto error;
	}

	pdev->dev.of_node = ofdev->dev.of_node;
	pdev->dev.of_node_reused = true;

	retval = platform_device_add(pdev);
	if (retval)
		goto error;