]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: iio: frequency: use dev_get_platdata()
authorNizam Haider <nizamhaider786@gmail.com>
Mon, 23 Nov 2015 18:07:16 +0000 (23:37 +0530)
committerJonathan Cameron <jic23@kernel.org>
Wed, 2 Dec 2015 18:42:06 +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/frequency/ad9832.c
drivers/staging/iio/frequency/ad9834.c

index 2b65faa6296a80f680dc666422973416161c7db8..18b27a1984b2bd37010e62147bfa6719504e8efe 100644 (file)
@@ -201,7 +201,7 @@ static const struct iio_info ad9832_info = {
 
 static int ad9832_probe(struct spi_device *spi)
 {
-       struct ad9832_platform_data *pdata = spi->dev.platform_data;
+       struct ad9832_platform_data *pdata = dev_get_platdata(&spi->dev);
        struct iio_dev *indio_dev;
        struct ad9832_state *st;
        struct regulator *reg;
index 6464f2cbe94b556f2738c39f874574262019ea9a..6366216e4f3783cabbf8c2270c0f54caa9a5b448 100644 (file)
@@ -318,7 +318,7 @@ static const struct iio_info ad9833_info = {
 
 static int ad9834_probe(struct spi_device *spi)
 {
-       struct ad9834_platform_data *pdata = spi->dev.platform_data;
+       struct ad9834_platform_data *pdata = dev_get_platdata(&spi->dev);
        struct ad9834_state *st;
        struct iio_dev *indio_dev;
        struct regulator *reg;