diff options
author | Matt Ranostay <mranostay@gmail.com> | 2016-02-14 18:59:07 -0800 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-24 20:40:40 +0000 |
commit | 98e55e93a017f5786767e8219179f9c43634762d (patch) | |
tree | 6291548482c95833ab0b168697aa83b6b1692aff /drivers/iio/chemical | |
parent | 7247645f686584552ec0f8ade7267bf7a4907624 (diff) | |
download | linux-98e55e93a017f5786767e8219179f9c43634762d.tar.bz2 |
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: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/chemical')
-rw-r--r-- | drivers/iio/chemical/atlas-ph-sensor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c index 71c8e02ea48a..62b37cd8fb56 100644 --- a/drivers/iio/chemical/atlas-ph-sensor.c +++ b/drivers/iio/chemical/atlas-ph-sensor.c @@ -178,10 +178,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()); |