[PATCH v2] staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call
From: Salah Triki
Date: Tue Aug 19 2025 - 11:06:46 EST
Remove the call to `dev_set_drvdata()` and the associated comment
since private data is never read.
Signed-off-by: Salah Triki <salah.triki@xxxxxxxxx>
---
Changes in v2 :
- Remove spi_set_drvdata() and outdated comment as suggested by David
Lechner
- Update commit title and message
drivers/staging/iio/adc/ad7816.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index 4774df778de9..172acf135f3b 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -359,8 +359,6 @@ static int ad7816_probe(struct spi_device *spi_dev)
if (!indio_dev)
return -ENOMEM;
chip = iio_priv(indio_dev);
- /* this is only used for device removal purposes */
- dev_set_drvdata(&spi_dev->dev, indio_dev);
chip->spi_dev = spi_dev;
for (i = 0; i <= AD7816_CS_MAX; i++)
--
2.43.0