staging: iio: adis16203: Remove unneeded spi_set_drvdata()
Subsystems (4)
PATCH 1/1 staging: iio: adis16203: Remove unneeded spi_set_drvdata()
* 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.
--- drivers/staging/iio/accel/adis16203.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/iio/accel/adis16203.c +0 -2
@@ -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;
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerQuoted 3 lines · On Mon, 3 Mar 2025 23:35:23 +0530 Saalim Quadri <[email protected]> wrote:
* Since we are making use of
devm_iio_device_register(), we no longer need this nor do we have anyspi_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.
Quoted 1 line
Signed-off-by Saalim Quadri <[email protected]>
Code is fine, so just this patch description stuff.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/staging/iio/accel/adis16203.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/iio/accel/adis16203.c +0
-2@@ -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;
Thank you for the review
I sent the patch v2 in a separate thread, if that is alright.
Sincerely,
Saalim Quadri