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

staging:iio:ad7780: Remove the ad7780_platform_data

The ad7780_platform_data contains just the reference voltage information.
Since the preferred way of specifying this information is using the Linux
regulator framework and the ad7780 platform_data is not used by other
users, it can be completely removed.

Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Dragos Bogdan and committed by
Jonathan Cameron
8ffedc1b cef7e125

+2 -36
+2 -7
drivers/staging/iio/adc/ad7780.c
··· 22 22 #include <linux/iio/sysfs.h> 23 23 #include <linux/iio/adc/ad_sigma_delta.h> 24 24 25 - #include "ad7780.h" 26 - 27 25 #define AD7780_RDY BIT(7) 28 26 #define AD7780_FILTER BIT(6) 29 27 #define AD7780_ERR BIT(5) ··· 160 162 161 163 static int ad7780_probe(struct spi_device *spi) 162 164 { 163 - struct ad7780_platform_data *pdata = spi->dev.platform_data; 164 165 struct ad7780_state *st; 165 166 struct iio_dev *indio_dev; 166 167 int ret, voltage_uv = 0; ··· 185 188 st->chip_info = 186 189 &ad7780_chip_info_tbl[spi_get_device_id(spi)->driver_data]; 187 190 188 - if (pdata && pdata->vref_mv) 189 - st->int_vref_mv = pdata->vref_mv; 190 - else if (voltage_uv) 191 + if (voltage_uv) 191 192 st->int_vref_mv = voltage_uv / 1000; 192 193 else 193 - dev_warn(&spi->dev, "reference voltage unspecified\n"); 194 + dev_warn(&spi->dev, "Reference voltage unspecified\n"); 194 195 195 196 spi_set_drvdata(spi, indio_dev); 196 197
-29
drivers/staging/iio/adc/ad7780.h
··· 1 - /* 2 - * AD7780/AD7781 SPI ADC driver 3 - * 4 - * Copyright 2011 Analog Devices Inc. 5 - * 6 - * Licensed under the GPL-2. 7 - */ 8 - #ifndef IIO_ADC_AD7780_H_ 9 - #define IIO_ADC_AD7780_H_ 10 - 11 - /* 12 - * TODO: struct ad7780_platform_data needs to go into include/linux/iio 13 - */ 14 - 15 - /* NOTE: 16 - * The AD7780 doesn't feature a dedicated SPI chip select, in addition it 17 - * features a dual use data out ready DOUT/RDY output. 18 - * In order to avoid contentions on the SPI bus, it's therefore necessary 19 - * to use spi bus locking combined with a dedicated GPIO to control the 20 - * power down reset signal of the AD7780. 21 - * 22 - * The DOUT/RDY output must also be wired to an interrupt capable GPIO. 23 - */ 24 - 25 - struct ad7780_platform_data { 26 - u16 vref_mv; 27 - }; 28 - 29 - #endif /* IIO_ADC_AD7780_H_ */