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.
Unified · Split
| @@ -76,14 +76,9 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) · 75 unmodified lines | ||
| 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); |
| @@ -112,6 +112,9 @@ static struct platform_device *fsl_usb2_device_register( · 111 unmodified lines | ||
| 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; |