summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorRenato Lui Geh <renatogeh@gmail.com>2018-11-05 17:16:14 -0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-11-16 18:32:31 +0000
commitbefa9f6a3e1f00df0cff9d991650dc8d541fb730 (patch)
treef36b63dba85ab5ed25294a9d130691bd8725692e /drivers/staging/iio
parent336650c785b62c3bea7c8cf6061c933a90241f67 (diff)
downloadlinux-befa9f6a3e1f00df0cff9d991650dc8d541fb730.tar.gz
linux-befa9f6a3e1f00df0cff9d991650dc8d541fb730.tar.bz2
linux-befa9f6a3e1f00df0cff9d991650dc8d541fb730.zip
staging: iio: ad7780: remove unnecessary stashed voltage value
This patch removes the unnecessary field int_vref_mv in ad7780_state referring to the device's voltage. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/adc/ad7780.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c
index aa0521a309db..c4a85789c2db 100644
--- a/drivers/staging/iio/adc/ad7780.c
+++ b/drivers/staging/iio/adc/ad7780.c
@@ -51,7 +51,6 @@ struct ad7780_state {
struct regulator *reg;
struct gpio_desc *powerdown_gpio;
unsigned int gain;
- u16 int_vref_mv;
struct ad_sigma_delta sd;
};
@@ -180,7 +179,7 @@ static int ad7780_probe(struct spi_device *spi)
{
struct ad7780_state *st;
struct iio_dev *indio_dev;
- int ret, voltage_uv = 0;
+ int ret;
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (!indio_dev)
@@ -200,16 +199,10 @@ static int ad7780_probe(struct spi_device *spi)
dev_err(&spi->dev, "Failed to enable specified AVdd supply\n");
return ret;
}
- voltage_uv = regulator_get_voltage(st->reg);
st->chip_info =
&ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data];
- if (voltage_uv)
- st->int_vref_mv = voltage_uv / 1000;
- else
- dev_warn(&spi->dev, "Reference voltage unspecified\n");
-
spi_set_drvdata(spi, indio_dev);
indio_dev->dev.parent = &spi->dev;