Re: [RFC PATCH 2/2] i2c: rcar: support named interrupts

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

 



On Mon, Aug 26, 2024 at 05:08:43PM +0200, Wolfram Sang wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-rcar.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index 1104aafe4433..1a232bc88bed 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -1192,10 +1192,13 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>  			goto out_pm_put;
>  	}
>  
> -	ret = platform_get_irq(pdev, 0);
> -	if (ret < 0)
> -		goto out_pm_put;
> -	priv->irq = ret;
> +	priv->irq = platform_get_irq_byname_optional(pdev, "main");
> +	if (priv->irq < 0) {
> +		priv->irq = platform_get_irq(pdev, 0);
> +		if (priv->irq < 0)
> +			goto out_pm_put;

'ret' should be set here, of course! Will fix when resending this
series.

> +	}
> +
>  	ret = devm_request_irq(dev, priv->irq, irqhandler, irqflags, dev_name(dev), priv);
>  	if (ret < 0) {
>  		dev_err(dev, "cannot get irq %d\n", priv->irq);
> -- 
> 2.43.0
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux