lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ybtk/KaLV6h+U9h5@rowland.harvard.edu>
Date:   Thu, 16 Dec 2021 11:10:36 -0500
From:   Alan Stern <stern@...land.harvard.edu>
To:     Rob Herring <robh@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: ohci-s3c2410: Use platform_get_irq() to get the
 interrupt

On Wed, Dec 15, 2021 at 04:53:57PM -0600, Rob Herring wrote:
> 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.
> 
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---

Acked-by: Alan Stern <stern@...land.harvard.edu>

>  drivers/usb/host/ohci-s3c2410.c | 10 ++++++++--
>  1 file 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;
>  
> -- 
> 2.32.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ