summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2021-12-15 16:52:03 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-17 16:52:21 +0100
commite1ffd5f0709de8a423925a60d1e4b3593e0c96b4 (patch)
tree44d1f40568d49cfaee2026baf66289d1d20b2da5 /drivers/usb
parentb6886c7826a17eaa908d7bae1537812bb78eb9fe (diff)
downloadlinux-e1ffd5f0709de8a423925a60d1e4b3593e0c96b4.tar.bz2
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. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211215225203.1991003-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/uhci-platform.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c
index be9e9db7cad1..b2049b47a08d 100644
--- a/drivers/usb/host/uhci-platform.c
+++ b/drivers/usb/host/uhci-platform.c
@@ -133,7 +133,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;