Re: [PATCH v3 6/6] iio: adc: ti-ads7950: complete conversion to using managed resources

From: David Lechner

Date: Sat Mar 07 2026 - 16:47:47 EST


On 3/5/26 1:21 PM, Dmitry Torokhov wrote:
> All resources that the driver needs have managed API now. Switch to
> using them to make code clearer and drop ti_ads7950_remove().
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---

One more small detail...

> -static void ti_ads7950_remove(struct spi_device *spi)
> -{
> - struct iio_dev *indio_dev = spi_get_drvdata(spi);

Since we are removing the only instance of spi_get_drvdata(), we can
also remove spi_set_drvdata() in the probe function

> - struct ti_ads7950_state *st = iio_priv(indio_dev);
> -
> - gpiochip_remove(&st->chip);
> - iio_device_unregister(indio_dev);
> - iio_triggered_buffer_cleanup(indio_dev);
> - mutex_destroy(&st->slock);
> }
>