LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Tang Bin <tangbin@cmss.chinamobile.com>
Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: twl6030-gpadc: Use the defined variable to clean code
Date: Mon, 30 Aug 2021 12:32:20 +0100	[thread overview]
Message-ID: <20210830123220.55980d62@jic23-huawei> (raw)
In-Reply-To: <20210823095921.16828-1-tangbin@cmss.chinamobile.com>

On Mon, 23 Aug 2021 17:59:21 +0800
Tang Bin <tangbin@cmss.chinamobile.com> wrote:

> Use the defined variable "dev" to make the code cleaner.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Applied.

Thanks,

> ---
>  drivers/iio/adc/twl6030-gpadc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
> index 0859f3f7d..5e4fbb033 100644
> --- a/drivers/iio/adc/twl6030-gpadc.c
> +++ b/drivers/iio/adc/twl6030-gpadc.c
> @@ -897,7 +897,7 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
>  
>  	ret = pdata->calibrate(gpadc);
>  	if (ret < 0) {
> -		dev_err(&pdev->dev, "failed to read calibration registers\n");
> +		dev_err(dev, "failed to read calibration registers\n");
>  		return ret;
>  	}
>  
> @@ -911,14 +911,14 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
>  
>  	ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK);
>  	if (ret < 0) {
> -		dev_err(&pdev->dev, "failed to enable GPADC interrupt\n");
> +		dev_err(dev, "failed to enable GPADC interrupt\n");
>  		return ret;
>  	}
>  
>  	ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, TWL6030_GPADCS,
>  					TWL6030_REG_TOGGLE1);
>  	if (ret < 0) {
> -		dev_err(&pdev->dev, "failed to enable GPADC module\n");
> +		dev_err(dev, "failed to enable GPADC module\n");
>  		return ret;
>  	}
>  


      reply	other threads:[~2021-08-30 11:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  9:59 Tang Bin
2021-08-30 11:32 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210830123220.55980d62@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangbin@cmss.chinamobile.com \
    --subject='Re: [PATCH] iio: adc: twl6030-gpadc: Use the defined variable to clean code' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).