linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, Denis Ciocca <denis.ciocca@st.com>
Subject: Re: [PATCH v2 2/8] iio: st_sensors: Use dev_get_platdata() to get platform_data
Date: Sun, 15 Mar 2020 12:34:06 +0000	[thread overview]
Message-ID: <20200315123406.68f85455@archlinux> (raw)
In-Reply-To: <20200313104955.30423-2-andriy.shevchenko@linux.intel.com>

On Fri, 13 Mar 2020 12:49:49 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Use dev_get_platdata() to get the platform_data instead of
> referencing it directly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied.  Thanks,

Jonathan

> ---
> v2: no change
>  drivers/iio/accel/st_accel_core.c              | 3 +--
>  drivers/iio/common/st_sensors/st_sensors_spi.c | 2 +-
>  drivers/iio/pressure/st_pressure_core.c        | 3 +--
>  3 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index 7320275c7e56..5f7bdb1f55d1 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -1170,8 +1170,7 @@ EXPORT_SYMBOL(st_accel_get_settings);
>  int st_accel_common_probe(struct iio_dev *indio_dev)
>  {
>  	struct st_sensor_data *adata = iio_priv(indio_dev);
> -	struct st_sensors_platform_data *pdata =
> -		(struct st_sensors_platform_data *)adata->dev->platform_data;
> +	struct st_sensors_platform_data *pdata = dev_get_platdata(adata->dev);
>  	struct iio_chan_spec *channels;
>  	size_t channels_size;
>  	int err;
> diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
> index 1275fb0eda31..dcbdef4a77f8 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_spi.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
> @@ -44,7 +44,7 @@ static bool st_sensors_is_spi_3_wire(struct spi_device *spi)
>  	if (device_property_read_bool(dev, "spi-3wire"))
>  		return true;
>  
> -	pdata = (struct st_sensors_platform_data *)dev->platform_data;
> +	pdata = dev_get_platdata(dev);
>  	if (pdata && pdata->spi_3wire)
>  		return true;
>  
> diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
> index bd972cec4830..8bb47c3b4d6b 100644
> --- a/drivers/iio/pressure/st_pressure_core.c
> +++ b/drivers/iio/pressure/st_pressure_core.c
> @@ -683,8 +683,7 @@ EXPORT_SYMBOL(st_press_get_settings);
>  int st_press_common_probe(struct iio_dev *indio_dev)
>  {
>  	struct st_sensor_data *press_data = iio_priv(indio_dev);
> -	struct st_sensors_platform_data *pdata =
> -		(struct st_sensors_platform_data *)press_data->dev->platform_data;
> +	struct st_sensors_platform_data *pdata = dev_get_platdata(press_data->dev);
>  	int err;
>  
>  	indio_dev->modes = INDIO_DIRECT_MODE;


  reply	other threads:[~2020-03-15 12:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 10:49 [PATCH v2 1/8] iio: light: st_uvis25: Drop unneeded casting when print error code Andy Shevchenko
2020-03-13 10:49 ` [PATCH v2 2/8] iio: st_sensors: Use dev_get_platdata() to get platform_data Andy Shevchenko
2020-03-15 12:34   ` Jonathan Cameron [this message]
2020-03-13 10:49 ` [PATCH v2 3/8] iio: st_sensors: Drop unneeded explicit castings Andy Shevchenko
2020-03-15 12:38   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 4/8] iio: st_sensors: Drop unneeded casting when print error code Andy Shevchenko
2020-03-15 12:40   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 5/8] iio: st_sensors: Join string literals back Andy Shevchenko
2020-03-15 12:40   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 6/8] iio: humidity: hts221: Use dev_get_platdata() to get platform_data Andy Shevchenko
2020-03-15 12:42   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 7/8] iio: humidity: hts221: Make use of device properties Andy Shevchenko
2020-03-15 12:43   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 8/8] iio: humidity: hts221: Drop unneeded casting when print error code Andy Shevchenko
2020-03-15 12:44   ` Jonathan Cameron
2020-03-16  8:27     ` Andy Shevchenko
2020-03-15 12:26 ` [PATCH v2 1/8] iio: light: st_uvis25: " Jonathan Cameron
2020-03-15 12:31   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200315123406.68f85455@archlinux \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=denis.ciocca@st.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).