All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Denis CIOCCA <denis.ciocca@st.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 5/7] iio:pressure: Removed unnecessary parameter on common_probe function
Date: Sat, 04 Oct 2014 11:25:50 +0100	[thread overview]
Message-ID: <542FCB2E.80208@kernel.org> (raw)
In-Reply-To: <1412350541-29431-5-git-send-email-denis.ciocca@st.com>

On 03/10/14 16:35, Denis CIOCCA wrote:
> Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Applied
> ---
>  drivers/iio/pressure/st_pressure.h      | 3 +--
>  drivers/iio/pressure/st_pressure_core.c | 9 ++++-----
>  drivers/iio/pressure/st_pressure_i2c.c  | 2 +-
>  drivers/iio/pressure/st_pressure_spi.c  | 2 +-
>  4 files changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/iio/pressure/st_pressure.h b/drivers/iio/pressure/st_pressure.h
> index 242943c..f5f4149 100644
> --- a/drivers/iio/pressure/st_pressure.h
> +++ b/drivers/iio/pressure/st_pressure.h
> @@ -26,8 +26,7 @@ static const struct st_sensors_platform_data default_press_pdata = {
>  	.drdy_int_pin = 1,
>  };
>  
> -int st_press_common_probe(struct iio_dev *indio_dev,
> -					struct st_sensors_platform_data *pdata);
> +int st_press_common_probe(struct iio_dev *indio_dev);
>  void st_press_common_remove(struct iio_dev *indio_dev);
>  
>  #ifdef CONFIG_IIO_BUFFER
> diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
> index 9563118..ee2ef7d 100644
> --- a/drivers/iio/pressure/st_pressure_core.c
> +++ b/drivers/iio/pressure/st_pressure_core.c
> @@ -409,8 +409,7 @@ static const struct iio_trigger_ops st_press_trigger_ops = {
>  #define ST_PRESS_TRIGGER_OPS NULL
>  #endif
>  
> -int st_press_common_probe(struct iio_dev *indio_dev,
> -				struct st_sensors_platform_data *plat_data)
> +int st_press_common_probe(struct iio_dev *indio_dev)
>  {
>  	struct st_sensor_data *pdata = iio_priv(indio_dev);
>  	int irq = pdata->get_irq_data_ready(indio_dev);
> @@ -439,11 +438,11 @@ int st_press_common_probe(struct iio_dev *indio_dev,
>  	pdata->odr = pdata->sensor_settings->odr.odr_avl[0].hz;
>  
>  	/* Some devices don't support a data ready pin. */
> -	if (!plat_data && pdata->sensor_settings->drdy_irq.addr)
> -		plat_data =
> +	if (!pdata->dev->platform_data && pdata->sensor_settings->drdy_irq.addr)
> +		pdata->dev->platform_data =
>  			(struct st_sensors_platform_data *)&default_press_pdata;
>  
> -	err = st_sensors_init_sensor(indio_dev, plat_data);
> +	err = st_sensors_init_sensor(indio_dev, pdata->dev->platform_data);
>  	if (err < 0)
>  		return err;
>  
> diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c
> index acaf165..dd73351 100644
> --- a/drivers/iio/pressure/st_pressure_i2c.c
> +++ b/drivers/iio/pressure/st_pressure_i2c.c
> @@ -56,7 +56,7 @@ static int st_press_i2c_probe(struct i2c_client *client,
>  
>  	st_sensors_i2c_configure(indio_dev, client, pdata);
>  
> -	err = st_press_common_probe(indio_dev, client->dev.platform_data);
> +	err = st_press_common_probe(indio_dev);
>  	if (err < 0)
>  		return err;
>  
> diff --git a/drivers/iio/pressure/st_pressure_spi.c b/drivers/iio/pressure/st_pressure_spi.c
> index f45d430..98c3e8e 100644
> --- a/drivers/iio/pressure/st_pressure_spi.c
> +++ b/drivers/iio/pressure/st_pressure_spi.c
> @@ -33,7 +33,7 @@ static int st_press_spi_probe(struct spi_device *spi)
>  
>  	st_sensors_spi_configure(indio_dev, spi, pdata);
>  
> -	err = st_press_common_probe(indio_dev, spi->dev.platform_data);
> +	err = st_press_common_probe(indio_dev);
>  	if (err < 0)
>  		return err;
>  
> 

  reply	other threads:[~2014-10-04 10:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 15:35 [PATCH 1/7] iio:imu: changed structure name from st_sensors to st_sensor_settings Denis CIOCCA
2014-10-03 15:35 ` [PATCH 2/7] iio:accel: Removed unnecessary parameter on common_probe function Denis CIOCCA
2014-10-04 10:25   ` Jonathan Cameron
2014-10-03 15:35 ` [PATCH 3/7] iio:gyro: " Denis CIOCCA
2014-10-04 10:25   ` Jonathan Cameron
2014-10-03 15:35 ` [PATCH 4/7] iio:magnetometer: " Denis CIOCCA
2014-10-04 10:25   ` Jonathan Cameron
2014-10-03 15:35 ` [PATCH 5/7] iio:pressure: " Denis CIOCCA
2014-10-04 10:25   ` Jonathan Cameron [this message]
2014-10-03 15:35 ` [PATCH 6/7] iio:pressure: Changed pressure data variable name to press_data Denis CIOCCA
2014-10-04 10:26   ` Jonathan Cameron
2014-10-03 15:35 ` [PATCH 7/7] iio:common: Set the device pointer into ST common sensors library Denis CIOCCA
2014-10-04 10:26   ` Jonathan Cameron
2014-10-04 10:24 ` [PATCH 1/7] iio:imu: changed structure name from st_sensors to st_sensor_settings 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=542FCB2E.80208@kernel.org \
    --to=jic23@kernel.org \
    --cc=denis.ciocca@st.com \
    --cc=linux-iio@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.