linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	jic23@kernel.org
Subject: Re: [PATCH] iio: adc: ad7292: remove unneeded spi_set_drvdata()
Date: Fri, 20 Nov 2020 11:21:58 -0300	[thread overview]
Message-ID: <20201120142158.GA2179@smtp.gmail.com> (raw)
In-Reply-To: <20201119142720.86326-1-alexandru.ardelean@analog.com>

LGTM.
Tested on raspberry pi kernel - rpi-5.9.y.

ad7292 was heavily based on ad7768-1. 
Maybe this might apply to ad7768-1 as well.

Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Tested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>

On 11/19, Alexandru Ardelean wrote:
> This seems to have been copied from a driver that calls spi_set_drvdata()
> but doesn't call spi_get_drvdata().
> Setting a private object on the SPI device's object isn't necessary if it
> won't be accessed.
> This change removes the spi_set_drvdata() call.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  drivers/iio/adc/ad7292.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
> index ab204e9199e9..70e33dd1c9f7 100644
> --- a/drivers/iio/adc/ad7292.c
> +++ b/drivers/iio/adc/ad7292.c
> @@ -276,8 +276,6 @@ static int ad7292_probe(struct spi_device *spi)
>  		return -EINVAL;
>  	}
>  
> -	spi_set_drvdata(spi, indio_dev);
> -
>  	st->reg = devm_regulator_get_optional(&spi->dev, "vref");
>  	if (!IS_ERR(st->reg)) {
>  		ret = regulator_enable(st->reg);
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-11-20 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 14:27 [PATCH] iio: adc: ad7292: remove unneeded spi_set_drvdata() Alexandru Ardelean
2020-11-20 14:21 ` Marcelo Schmitt [this message]
2020-11-21 15:16   ` Jonathan Cameron

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=20201120142158.GA2179@smtp.gmail.com \
    --to=marcelo.schmitt1@gmail.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).