All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, srinivas.pandruvada@intel.com
Subject: Re: [PATCH] staging:iio: hid-sensors Use iio_push_to_buffer
Date: Fri, 07 Sep 2012 11:12:12 +0200	[thread overview]
Message-ID: <5049BA6C.1050309@metafoo.de> (raw)
In-Reply-To: <1346966403-14517-1-git-send-email-jic23@kernel.org>

On 09/06/2012 11:20 PM, Jonathan Cameron wrote:
> Consistently use iio_push_to_buffer instead of manually calling the buffers
> store_to callback.
> 
> These crossed with Lars-Peter's patch set doing every other case.

Actually I only did this for drivers/staging/iio, the at91_adc driver in
drivers/iio still uses the store_to callback as well, might make sense to
convert it as well in this patch.

> 
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> ---
>  drivers/iio/accel/hid-sensor-accel-3d.c       | 2 +-
>  drivers/iio/gyro/hid-sensor-gyro-3d.c         | 2 +-
>  drivers/iio/light/hid-sensor-als.c            | 2 +-
>  drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
> index 33aa97c..c593eb23 100644
> --- a/drivers/iio/accel/hid-sensor-accel-3d.c
> +++ b/drivers/iio/accel/hid-sensor-accel-3d.c
> @@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
>  				datum_sz);
>  		return;
>  	}
> -	buffer->access->store_to(buffer, (u8 *)data, timestamp);
> +	iio_push_to_buffer(buffer, (u8 *)data, timestamp);
>  }
>  
>  /* Callback handler to send event after all samples are received and captured */
> diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
> index 50ec09b..94a4740 100644
> --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
> +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
> @@ -212,7 +212,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
>  				datum_sz);
>  		return;
>  	}
> -	buffer->access->store_to(buffer, (u8 *)data, timestamp);
> +	iio_push_to_buffer(buffer, (u8 *)data, timestamp);
>  }
>  
>  /* Callback handler to send event after all samples are received and captured */
> diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
> index 2cff7d5..b3c8e91 100644
> --- a/drivers/iio/light/hid-sensor-als.c
> +++ b/drivers/iio/light/hid-sensor-als.c
> @@ -191,7 +191,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
>  				datum_sz);
>  		return;
>  	}
> -	buffer->access->store_to(buffer, (u8 *)data, timestamp);
> +	iio_push_to_buffer(buffer, (u8 *)data, timestamp);
>  }
>  
>  /* Callback handler to send event after all samples are received and captured */
> diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> index 07591f4..397704e 100644
> --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> @@ -213,7 +213,7 @@ static void hid_sensor_push_data(struct iio_dev *indio_dev, u8 *data, int len)
>  				datum_sz);
>  		return;
>  	}
> -	buffer->access->store_to(buffer, (u8 *)data, timestamp);
> +	iio_push_to_buffer(buffer, (u8 *)data, timestamp);
>  }
>  
>  /* Callback handler to send event after all samples are received and captured */


  parent reply	other threads:[~2012-09-07  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 21:20 [PATCH] staging:iio: hid-sensors Use iio_push_to_buffer Jonathan Cameron
2012-09-06 21:23 ` [PATCH V2] iio: Drop timestamp parameter from buffer store_to callback Jonathan Cameron
2012-09-06 22:17 ` [PATCH] staging:iio: hid-sensors Use iio_push_to_buffer Pandruvada, Srinivas
2012-09-07  9:12 ` Lars-Peter Clausen [this message]
2012-09-07 18:08   ` 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=5049BA6C.1050309@metafoo.de \
    --to=lars@metafoo.de \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    /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.