History

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.

Darren Stevens committed 4 years ago

Commit bb160ee1 parent 3d0dc532 files · +6 −8Browse files

Unified · Split

2 files
  1. drivers/usb/host/ehci-fsl.c +3 −8
  2. drivers/usb/host/fsl-mph-dr-of.c +3 −0
drivers/usb/host/ehci-fsl.c+3−8
@@ -76,14 +76,9 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) · 75 unmodified lines
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+3−0
@@ -112,6 +112,9 @@ static struct platform_device *fsl_usb2_device_register( · 111 unmodified lines
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;