summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-s3c2410.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2021-12-16 01:53:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-17 18:51:59 +0300
commitb6886c7826a17eaa908d7bae1537812bb78eb9fe (patch)
tree2e9cf3356df3dcfcf249d7c3b18fa5496e7fa44e /drivers/usb/host/ohci-s3c2410.c
parent2dec70f18b914a3108ab656417c4a0b77fdea2cf (diff)
downloadlinux-b6886c7826a17eaa908d7bae1537812bb78eb9fe.tar.xz
usb: ohci-s3c2410: 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 relying on the static IRQ resources is blocking removing the static setup from the DT core code. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211215225358.1993774-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-s3c2410.c')
-rw-r--r--drivers/usb/host/ohci-s3c2410.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 1bec9b585e2d..12264c048601 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -356,7 +356,7 @@ static int ohci_hcd_s3c2410_probe(struct platform_device *dev)
{
struct usb_hcd *hcd = NULL;
struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev);
- int retval;
+ int retval, irq;
s3c2410_usb_set_power(info, 1, 1);
s3c2410_usb_set_power(info, 2, 1);
@@ -388,9 +388,15 @@ static int ohci_hcd_s3c2410_probe(struct platform_device *dev)
goto err_put;
}
+ irq = platform_get_irq(dev, 0);
+ if (irq < 0) {
+ retval = irq;
+ goto err_put;
+ }
+
s3c2410_start_hc(dev, hcd);
- retval = usb_add_hcd(hcd, dev->resource[1].start, 0);
+ retval = usb_add_hcd(hcd, irq, 0);
if (retval != 0)
goto err_ioremap;