Commit 49bd7756 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron
Browse files

iio: adc: remove unused private data assigned with spi_set_drvdata()



These were usually used before the conversion to devm_ functions, so that
the remove hook would be able to retrieve the pointer and do cleanups on
remove.
When the conversion happened, they should have been removed, but were
omitted.

Some drivers were copied from drivers that fit the criteria described
above. In any case, in order to prevent more drivers from being used as
example (and have spi_set_drvdata() needlessly set), this change removes it
from the IIO ADC group.

Signed-off-by: default avatarAlexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210513111035.77950-1-aardelean@deviqon.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 21fd77af
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -389,8 +389,6 @@ static int ad7476_probe(struct spi_device *spi)
	if (IS_ERR(st->convst_gpio))
		return PTR_ERR(st->convst_gpio);

	spi_set_drvdata(spi, indio_dev);

	st->spi = spi;

	indio_dev->name = spi_get_device_id(spi)->name;
+0 −2
Original line number Diff line number Diff line
@@ -273,8 +273,6 @@ static int ad7766_probe(struct spi_device *spi)
			return ret;
	}

	spi_set_drvdata(spi, indio_dev);

	ad7766->spi = spi;

	/* First byte always 0 */
+0 −1
Original line number Diff line number Diff line
@@ -614,7 +614,6 @@ static int ad7768_probe(struct spi_device *spi)

	st->mclk_freq = clk_get_rate(st->mclk);

	spi_set_drvdata(spi, indio_dev);
	mutex_init(&st->lock);

	indio_dev->channels = ad7768_channels;
+0 −1
Original line number Diff line number Diff line
@@ -268,7 +268,6 @@ static int ad7887_probe(struct spi_device *spi)
	st->chip_info =
		&ad7887_chip_info_tbl[spi_get_device_id(spi)->driver_data];

	spi_set_drvdata(spi, indio_dev);
	st->spi = spi;

	indio_dev->name = spi_get_device_id(spi)->name;
+0 −2
Original line number Diff line number Diff line
@@ -434,8 +434,6 @@ static int ad9467_probe(struct spi_device *spi)
		mdelay(10);
	}

	spi_set_drvdata(spi, st);

	conv->chip_info = &info->axi_adc_info;

	id = ad9467_spi_read(spi, AN877_ADC_REG_CHIP_ID);
Loading