Re: [PATCH] ata: Use platform_get_irq() to get the interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

   Please be more specific in the subject: s/ata:/pata_pxa:/.

On 3/8/22 5:59 AM, cgel.zte@xxxxxxxxx wrote:

> From: Minghao Chi (CGEL ZTE) <chi.minghao@xxxxxxxxxx>
> 
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypassed the hierarchical setup and messed up the
> irq chaining.
> 
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq().
> 
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@xxxxxxxxxx>
> ---
>  drivers/ata/pata_pxa.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
> index 41430f79663c..6394ab4cbc1b 100644
> --- a/drivers/ata/pata_pxa.c
> +++ b/drivers/ata/pata_pxa.c
[...]
> @@ -205,8 +205,8 @@ static int pxa_ata_probe(struct platform_device *pdev)
>  	/*
>  	 * IRQ pin
>  	 */
> -	irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (unlikely(irq_res == NULL))
> +	irq = platform_get_irq(pdev, 0);
> +	if (unlikely(irq < 0))
>  		return -EINVAL;

   Why did you not switch to returning 'irq'? The way it is now, the deferred
probing doesn't work...

[...]

MBR, Sergey



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux