Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Renato Lui Geh and committed by
Jonathan Cameron
befa9f6a 336650c7

+1 -8
+1 -8
drivers/staging/iio/adc/ad7780.c
··· 51 51 struct regulator *reg; 52 52 struct gpio_desc *powerdown_gpio; 53 53 unsigned int gain; 54 - u16 int_vref_mv; 55 54 56 55 struct ad_sigma_delta sd; 57 56 }; ··· 179 180 { 180 181 struct ad7780_state *st; 181 182 struct iio_dev *indio_dev; 182 - int ret, voltage_uv = 0; 183 + int ret; 183 184 184 185 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); 185 186 if (!indio_dev) ··· 199 200 dev_err(&spi->dev, "Failed to enable specified AVdd supply\n"); 200 201 return ret; 201 202 } 202 - voltage_uv = regulator_get_voltage(st->reg); 203 203 204 204 st->chip_info = 205 205 &ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data]; 206 - 207 - if (voltage_uv) 208 - st->int_vref_mv = voltage_uv / 1000; 209 - else 210 - dev_warn(&spi->dev, "Reference voltage unspecified\n"); 211 206 212 207 spi_set_drvdata(spi, indio_dev); 213 208