Staging: iio: adc: use dev_get_platdata()
authorNizam Haider <nizamhaider786@gmail.com>
Mon, 23 Nov 2015 17:33:07 +0000 (23:03 +0530)
committerJonathan Cameron <jic23@kernel.org>
Wed, 2 Dec 2015 18:42:05 +0000 (18:42 +0000)
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7192.c
drivers/staging/iio/adc/ad7280a.c
drivers/staging/iio/adc/ad7816.c

index bb40f37287426c4855a70b0b19b124802a52c284..92211039ffa941270b5047bbab16c5e411665940 100644 (file)
@@ -609,7 +609,7 @@ static const struct iio_chan_spec ad7192_channels[] = {
 
 static int ad7192_probe(struct spi_device *spi)
 {
-       const struct ad7192_platform_data *pdata = spi->dev.platform_data;
+       const struct ad7192_platform_data *pdata = dev_get_platdata(&spi->dev);
        struct ad7192_state *st;
        struct iio_dev *indio_dev;
        int ret, voltage_uv = 0;
index 35acb1a4669b30b1cbe0fc565ab3a797b4dc04ae..f45ebedb7a05689762f5c79aba36ba543543a64b 100644 (file)
@@ -833,7 +833,7 @@ static const struct ad7280_platform_data ad7793_default_pdata = {
 
 static int ad7280_probe(struct spi_device *spi)
 {
-       const struct ad7280_platform_data *pdata = spi->dev.platform_data;
+       const struct ad7280_platform_data *pdata = dev_get_platdata(&spi->dev);
        struct ad7280_state *st;
        int ret;
        const unsigned short tACQ_ns[4] = {465, 1010, 1460, 1890};
index c8e15664652856a331938398bffc597b4a8f0b14..22260512cf01e5eb61d29b8c4e47819e63b7d776 100644 (file)
@@ -345,7 +345,7 @@ static int ad7816_probe(struct spi_device *spi_dev)
 {
        struct ad7816_chip_info *chip;
        struct iio_dev *indio_dev;
-       unsigned short *pins = spi_dev->dev.platform_data;
+       unsigned short *pins = dev_get_platdata(&spi_dev->dev);
        int ret = 0;
        int i;