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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210724162741.15a8b8b6@jic23-huawei>
Date:   Sat, 24 Jul 2021 16:27:41 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Tang Bin <tangbin@...s.chinamobile.com>
Cc:     knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        broonie@...nel.org, lgirdwood@...il.com, linux-iio@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Zhang Shengju <zhangshengju@...s.chinamobile.com>
Subject: Re: [PATCH] iio: adc: fsl-imx25-gcq: Use the defined variable to
 clean code

On Tue, 20 Jul 2021 20:59:45 +0800
Tang Bin <tangbin@...s.chinamobile.com> wrote:

> Use the defined variable "dev" to make the code cleaner.
> 
> Co-developed-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>

Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/fsl-imx25-gcq.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
> index d28976f21..01fe5b137 100644
> --- a/drivers/iio/adc/fsl-imx25-gcq.c
> +++ b/drivers/iio/adc/fsl-imx25-gcq.c
> @@ -192,11 +192,11 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,
>  	 */
>  	priv->vref[MX25_ADC_REFP_INT] = NULL;
>  	priv->vref[MX25_ADC_REFP_EXT] =
> -		devm_regulator_get_optional(&pdev->dev, "vref-ext");
> +		devm_regulator_get_optional(dev, "vref-ext");
>  	priv->vref[MX25_ADC_REFP_XP] =
> -		devm_regulator_get_optional(&pdev->dev, "vref-xp");
> +		devm_regulator_get_optional(dev, "vref-xp");
>  	priv->vref[MX25_ADC_REFP_YP] =
> -		devm_regulator_get_optional(&pdev->dev, "vref-yp");
> +		devm_regulator_get_optional(dev, "vref-yp");
>  
>  	for_each_child_of_node(np, child) {
>  		u32 reg;
> @@ -298,7 +298,7 @@ static int mx25_gcq_probe(struct platform_device *pdev)
>  	int ret;
>  	int i;
>  
> -	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*priv));
> +	indio_dev = devm_iio_device_alloc(dev, sizeof(*priv));
>  	if (!indio_dev)
>  		return -ENOMEM;
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ