summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2020-11-19 15:27:20 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-11-21 16:15:28 +0100
commit24da9627e674305187a9908b328ffabcca65e2b5 (patch)
tree9923b4b3f24b85708cd630c50efd76daef16a7b2 /drivers/iio/adc
parentiio: adc: cpcap: Fix fall-through warnings for Clang (diff)
downloadlinux-24da9627e674305187a9908b328ffabcca65e2b5.tar.xz
linux-24da9627e674305187a9908b328ffabcca65e2b5.zip
iio: adc: ad7292: remove unneeded spi_set_drvdata()
This seems to have been copied from a driver that calls spi_set_drvdata() but doesn't call spi_get_drvdata(). Setting a private object on the SPI device's object isn't necessary if it won't be accessed. This change removes the spi_set_drvdata() call. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Tested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Link: https://lore.kernel.org/r/20201119142720.86326-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/ad7292.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
index ab204e9199e9..70e33dd1c9f7 100644
--- a/drivers/iio/adc/ad7292.c
+++ b/drivers/iio/adc/ad7292.c
@@ -276,8 +276,6 @@ static int ad7292_probe(struct spi_device *spi)
return -EINVAL;
}
- spi_set_drvdata(spi, indio_dev);
-
st->reg = devm_regulator_get_optional(&spi->dev, "vref");
if (!IS_ERR(st->reg)) {
ret = regulator_enable(st->reg);