Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rob Herring and committed by
Greg Kroah-Hartman
b6886c78 2dec70f1

+8 -2
+8 -2
drivers/usb/host/ohci-s3c2410.c
··· 356 356 { 357 357 struct usb_hcd *hcd = NULL; 358 358 struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev); 359 - int retval; 359 + int retval, irq; 360 360 361 361 s3c2410_usb_set_power(info, 1, 1); 362 362 s3c2410_usb_set_power(info, 2, 1); ··· 388 388 goto err_put; 389 389 } 390 390 391 + irq = platform_get_irq(dev, 0); 392 + if (irq < 0) { 393 + retval = irq; 394 + goto err_put; 395 + } 396 + 391 397 s3c2410_start_hc(dev, hcd); 392 398 393 - retval = usb_add_hcd(hcd, dev->resource[1].start, 0); 399 + retval = usb_add_hcd(hcd, irq, 0); 394 400 if (retval != 0) 395 401 goto err_ioremap; 396 402