Commit 98e55e93 authored by Matt Ranostay's avatar Matt Ranostay Committed by Jonathan Cameron

iio: chemical: atlas-ph-sensor: use regmap_bulk_read

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: default avatarMatt Ranostay <mranostay@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 7247645f
...@@ -178,10 +178,10 @@ static irqreturn_t atlas_trigger_handler(int irq, void *private) ...@@ -178,10 +178,10 @@ static irqreturn_t atlas_trigger_handler(int irq, void *private)
struct atlas_data *data = iio_priv(indio_dev); struct atlas_data *data = iio_priv(indio_dev);
int ret; int ret;
ret = i2c_smbus_read_i2c_block_data(data->client, ATLAS_REG_PH_DATA, ret = regmap_bulk_read(data->regmap, ATLAS_REG_PH_DATA,
sizeof(data->buffer[0]), (u8 *) &data->buffer); (u8 *) &data->buffer, sizeof(data->buffer[0]));
if (ret > 0) if (!ret)
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer, iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
iio_get_time_ns()); iio_get_time_ns());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment