From e1ffd5f0709de8a423925a60d1e4b3593e0c96b4 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 15 Dec 2021 16:52:03 -0600 Subject: [PATCH] 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 Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20211215225203.1991003-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/uhci-platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index be9e9db..b2049b4 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; -- 2.7.4