linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Matt Ranostay <mranostay@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: chemical: atlas-ph-sensor: use regmap_bulk_read
Date: Sun, 21 Feb 2016 20:34:52 +0000	[thread overview]
Message-ID: <56CA1F6C.4010400@kernel.org> (raw)
In-Reply-To: <1455505147-2261-1-git-send-email-mranostay@gmail.com>

On 15/02/16 02:59, Matt Ranostay wrote:
> Replaced i2c_smbus_read_i2c_block_data() with regmap_bulk_read()
> function call. This is to make the driver code more consistent.
> 
> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Oops.
Applied, thanks,

Jonathan
> ---
>  drivers/iio/chemical/atlas-ph-sensor.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
> index 06cd49c..93fcea9 100644
> --- a/drivers/iio/chemical/atlas-ph-sensor.c
> +++ b/drivers/iio/chemical/atlas-ph-sensor.c
> @@ -180,10 +180,10 @@ static irqreturn_t atlas_trigger_handler(int irq, void *private)
>  	struct atlas_data *data = iio_priv(indio_dev);
>  	int ret;
>  
> -	ret = i2c_smbus_read_i2c_block_data(data->client, ATLAS_REG_PH_DATA,
> -				sizeof(data->buffer[0]), (u8 *) &data->buffer);
> +	ret = regmap_bulk_read(data->regmap, ATLAS_REG_PH_DATA,
> +			      (u8 *) &data->buffer, sizeof(data->buffer[0]));
>  
> -	if (ret > 0)
> +	if (!ret)
>  		iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
>  				iio_get_time_ns());
>  
> 


      reply	other threads:[~2016-02-21 20:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  2:59 [PATCH] iio: chemical: atlas-ph-sensor: use regmap_bulk_read Matt Ranostay
2016-02-21 20:34 ` Jonathan Cameron [this message]

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=56CA1F6C.4010400@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mranostay@gmail.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 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).