Commit 21fd77af authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron
Browse files

iio: imu: 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 IMU group.

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


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 4b36151d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1157,8 +1157,6 @@ static int adis16400_probe(struct spi_device *spi)
		return -ENOMEM;

	st = iio_priv(indio_dev);
	/* this is only used for removal purposes */
	spi_set_drvdata(spi, indio_dev);

	/* setup the industrialio driver allocated elements */
	st->variant = &adis16400_chips[spi_get_device_id(spi)->driver_data];
+0 −2
Original line number Diff line number Diff line
@@ -387,8 +387,6 @@ static int adis16460_probe(struct spi_device *spi)
	if (indio_dev == NULL)
		return -ENOMEM;

	spi_set_drvdata(spi, indio_dev);

	st = iio_priv(indio_dev);

	st->chip_info = &adis16460_chip_info;
+0 −1
Original line number Diff line number Diff line
@@ -1328,7 +1328,6 @@ static int adis16475_probe(struct spi_device *spi)
		return -ENOMEM;

	st = iio_priv(indio_dev);
	spi_set_drvdata(spi, indio_dev);

	st->info = device_get_match_data(&spi->dev);
	if (!st->info)
+0 −2
Original line number Diff line number Diff line
@@ -1406,8 +1406,6 @@ static int adis16480_probe(struct spi_device *spi)
	if (indio_dev == NULL)
		return -ENOMEM;

	spi_set_drvdata(spi, indio_dev);

	st = iio_priv(indio_dev);

	st->chip_info = &adis16480_chip_info[id->driver_data];