From: Alexandru Ardelean Date: Thu, 13 May 2021 12:25:12 +0000 (+0300) Subject: iio: imu: remove unused private data assigned with spi_set_drvdata() X-Git-Tag: accepted/tizen/unified/20230118.172025~6889^2~85^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21fd77afa113bef69c0982a7203a471a11c76b80;p=platform%2Fkernel%2Flinux-rpi.git 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: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513122512.93187-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c index 641b4f7..b12917a 100644 --- a/drivers/iio/imu/adis16400.c +++ b/drivers/iio/imu/adis16400.c @@ -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]; diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c index ba373d7..a6f9fba 100644 --- a/drivers/iio/imu/adis16460.c +++ b/drivers/iio/imu/adis16460.c @@ -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; diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c index d0e84e5..eb48102 100644 --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -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) diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c index 9ec0e61..a869a6e 100644 --- a/drivers/iio/imu/adis16480.c +++ b/drivers/iio/imu/adis16480.c @@ -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];