staging: iio: adis16203: Remove unneeded spi_set_drvdata()
Subsystems (4)
PATCH v2 1/1 staging: iio: adis16203: Remove unneeded spi_set_drvdata()
By making use of devm_iio_device_register(), we no longer have a driver remove callback.
Since this was the last user of spi_get_drvdata(),
we can drop the call to spi_set_drvdata().
Signed-off-by Saalim Quadri <[email protected]>
--- 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
Sorry, I forgot to add a V2 description
V1 -> V2: Update commit message description
Sincerely,
Saalim Quadri
Jonathan Cameron
maintainerQuoted 6 lines · On Thu, 6 Mar 2025 05:19:49 +0530 Saalim Quadri <[email protected]> wrote:
By making use of
devm_iio_device_register(), we no longer have a driver remove callback.
Since this was the last user ofspi_get_drvdata(),
we can drop the call tospi_set_drvdata().Signed-off-by Saalim Quadri <[email protected]>
As per other discussion. Dropping this one as better to merge support into the adis16201 driver.
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;