Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v2] staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call
@ 2025-08-19 15:00 Salah Triki
  2025-08-19 15:05 ` David Lechner
  0 siblings, 1 reply; 3+ messages in thread
From: Salah Triki @ 2025-08-19 15:00 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, Greg Kroah-Hartman,
	linux-iio, linux-staging, linux-kernel
  Cc: salah.triki

Remove the call to `dev_set_drvdata()` and the associated comment
since private data is never read.

Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call
  2025-08-19 15:00 [PATCH v2] staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call Salah Triki
@ 2025-08-19 15:05 ` David Lechner
  2025-08-19 18:20   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: David Lechner @ 2025-08-19 15:05 UTC (permalink / raw)
  To: Salah Triki, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, Nuno Sá, Andy Shevchenko,
	Greg Kroah-Hartman, linux-iio, linux-staging, linux-kernel

On 8/19/25 10:00 AM, Salah Triki wrote:
> Remove the call to `dev_set_drvdata()` and the associated comment
> since private data is never read.
> 
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
> Changes in v2 :

Reviewed-by: David Lechner <dlechner@baylibre.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call
  2025-08-19 15:05 ` David Lechner
@ 2025-08-19 18:20   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2025-08-19 18:20 UTC (permalink / raw)
  To: David Lechner
  Cc: Salah Triki, Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
	Andy Shevchenko, Greg Kroah-Hartman, linux-iio, linux-staging,
	linux-kernel

On Tue, 19 Aug 2025 10:05:09 -0500
David Lechner <dlechner@baylibre.com> wrote:

> On 8/19/25 10:00 AM, Salah Triki wrote:
> > Remove the call to `dev_set_drvdata()` and the associated comment
> > since private data is never read.
> > 
> > Signed-off-by: Salah Triki <salah.triki@gmail.com>
> > ---
> > Changes in v2 :  
> 
> Reviewed-by: David Lechner <dlechner@baylibre.com>

Applied, thanks!

This motivated to do my periodic can I drop this driver yet check
against my usual rule of once it's obsolete from the supplier and
no significant work on the driver (staging only I'm less keen to remove
drives in good condition!)
Unfortunately 7817 which it supports is still in production :(
I then checked the other drivers still there and they all cover production
parts as well.

This is a pretty simple device and probably a good target for someone
who wants to try their first driver. It would be a near rewrite as this
code is miles off ABI wise.

Doesn't look like there is a currently available dev board, but it's
available in a TSSOP and will run on wide range of voltages so not
a challenge for someone to give a go on a break out board.

Just thought I'd mention that and see if anyone jumped on it ;)

Jonathan

p.s. One day I'll just decide to delete all the remaining staging drivers.
     Analog folk, they are all yours!  I can't blame any of you though
     as I think the first stuff from Michael was the following year.
  

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-19 18:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 15:00 [PATCH v2] staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call Salah Triki
2025-08-19 15:05 ` David Lechner
2025-08-19 18:20   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox