usb: uhci: Use platform_get_irq() to get the interrupt
Subsystems (2)
PATCH 1/1 usb: uhci: Use platform_get_irq() to get the interrupt
Accessing platform device resources directly has long been deprecated for DT as IRQ resources may not be available at device creation time. Drivers continuing to use static IRQ resources is blocking removing the static setup from the DT core code.
Signed-off-by Rob Herring <[email protected]>
--- drivers/usb/host/uhci-platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/usb/host/uhci-platform.c +5 -1
@@ -132,7 +132,11 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev) goto err_rmr; } - ret =usb_add_hcd (hcd, pdev->resource[1 ].start,IRQF_SHARED ); + ret =platform_get_irq (pdev,0 ); +if (ret <0 ) + goto err_clk; + + ret =usb_add_hcd (hcd, ret,IRQF_SHARED );if (ret) goto err_clk;
Signature · 1 line
2.32.0
Quoted 7 lines · Rob Herring
Accessing platform device resources directly has long been deprecated for DT as IRQ resources may not be available at device creation time. Drivers continuing to use static IRQ resources is blocking removing the static setup from the DT core code.
Signed-off-by Rob Herring <[email protected]>---
Acked-by Alan Stern <[email protected]>
Quoted 23 lines
drivers/usb/host/uhci-platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/usb/host/uhci-platform.c +5
-1@@ -132,7 +132,11 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev) goto err_rmr; } - ret =usb_add_hcd (hcd, pdev->resource[1 ].start,IRQF_SHARED ); + ret =platform_get_irq (pdev,0 ); +if (ret <0 ) + goto err_clk; + + ret =usb_add_hcd (hcd, ret,IRQF_SHARED );if (ret) goto err_clk;Signature · 1 line
2.32.0