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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Jul 2020 21:11:52 +0200
From:   Heiko Stübner <heiko@...ech.de>
To:     Dejin Zheng <zhengdejin5@...il.com>
Cc:     corbet@....net, gregkh@...uxfoundation.org, rafael@...nel.org,
        f.fainelli@...il.com, linux-doc@...r.kernel.org,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
        Michal Simek <michal.simek@...inx.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v4 2/2] i2c: busses: convert to devm_platform_request_irq()

Am Freitag, 17. Juli 2020, 18:11:58 CEST schrieb Dejin Zheng:
> Use devm_platform_request_irq() to simplify code, and it contains
> platform_get_irq() and devm_request_irq().
> 
> Cc: Michal Simek <michal.simek@...inx.com>
> Cc: Wolfram Sang <wsa@...-dreams.de>
> Signed-off-by: Dejin Zheng <zhengdejin5@...il.com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> Acked-by: Michal Simek <michal.simek@...inx.com>


Rockchip part (i2c-rk3x):
Reviewed-by: Heiko Stuebner <heiko@...ech.de>

> diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
> index 8e3cc85d1921..1f0ac69c5774 100644
> --- a/drivers/i2c/busses/i2c-rk3x.c
> +++ b/drivers/i2c/busses/i2c-rk3x.c
> @@ -1227,7 +1227,6 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
>  	int ret = 0;
>  	int bus_nr;
>  	u32 value;
> -	int irq;
>  	unsigned long clk_rate;
>  
>  	i2c = devm_kzalloc(&pdev->dev, sizeof(struct rk3x_i2c), GFP_KERNEL);
> @@ -1289,17 +1288,10 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> -	/* IRQ setup */
> -	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0)
> -		return irq;
> -
> -	ret = devm_request_irq(&pdev->dev, irq, rk3x_i2c_irq,
> -			       0, dev_name(&pdev->dev), i2c);
> -	if (ret < 0) {
> -		dev_err(&pdev->dev, "cannot request IRQ\n");
> +	ret = devm_platform_request_irq(pdev, 0, NULL, rk3x_i2c_irq,
> +					0, dev_name(&pdev->dev), i2c);
> +	if (ret < 0)
>  		return ret;
> -	}
>  
>  	platform_set_drvdata(pdev, i2c);
>  




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ