Re: [PATCH] staging: iio: adis16203: Remove unneeded spi_set_drvdata()

Jonathan Cameron
2025-03-04T14:32:43Z

On Mon, 3 Mar 2025 23:35:23 +0530
Saalim Quadri <danascape@gmail.com> wrote:

> * Since we are making use of devm_iio_device_register(), we no longer
> need this nor do we have any spi_get_drvdata() in the driver.
>
Why have a single bullet point?
Also please rewrite in imperative sense. Something like

Driver no longer has a remove callback after conversion to fully
devm_ managed probe(). Remove now unneeded spi_get_drvdata()
as that value was previously on read in the remove() callback.

> Signed-off-by: Saalim Quadri <danascape@gmail.com>
Code is fine, so just this patch description stuff.

Thanks,

Jonathan

> ---
> drivers/staging/iio/accel/adis16203.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
> index c1c73308800c..3faf3c61046a 100644
> --- a/drivers/staging/iio/accel/adis16203.c
> +++ b/drivers/staging/iio/accel/adis16203.c
> @@ -267,8 +267,6 @@ static int adis16203_probe(struct spi_device *spi)
> if (!indio_dev)
> return -ENOMEM;
> st = iio_priv(indio_dev);
> - /* this is only used for removal purposes */
> - spi_set_drvdata(spi, indio_dev);
>
> indio_dev->name = spi->dev.driver->name;
> indio_dev->channels = adis16203_channels;