Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1279361
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Staging: iio: frequency: use dev_get_platdata() |
| Date | 2015-11-29 16:30 +0100 |
| Message-ID | <qAc5k-7P9-15@gated-at.bofh.it> (permalink) |
| References | <qy3IR-5o5-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 23/11/15 18:07, Nizam Haider wrote:
> Use the wrapper function for retrieving the platform data instead of
> accessing dev->platform_data directly.
>
> Signed-off-by: Nizam Haider <nijamh@cdac.in>
applied
> ---
> drivers/staging/iio/frequency/ad9832.c | 2 +-
> drivers/staging/iio/frequency/ad9834.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> index 2b65faa..18b27a1 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -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;
> diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
> index 6464f2c..6366216 100644
> --- a/drivers/staging/iio/frequency/ad9834.c
> +++ b/drivers/staging/iio/frequency/ad9834.c
> @@ -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;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Staging: iio: frequency: use dev_get_platdata() Nizam Haider <nizamhaider786@gmail.com> - 2015-11-23 19:10 +0100 Re: [PATCH] Staging: iio: frequency: use dev_get_platdata() Jonathan Cameron <jic23@kernel.org> - 2015-11-29 16:30 +0100
csiph-web