summaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity/hts221_buffer.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 09:31:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-20 09:31:35 +0200
commit6bdb486c5a628f7a927c2658166e3a5ef1f883e7 (patch)
tree4b817231c6f48216bc0deff7075c91b6c3ebdf35 /drivers/iio/humidity/hts221_buffer.c
parentda6d647598a6d182eb6a0344a7b14ae005244399 (diff)
parentba47d845d715a010f7b51f6f89bae32845e6acb7 (diff)
downloadlinux-stable-6bdb486c5a628f7a927c2658166e3a5ef1f883e7.tar.gz
linux-stable-6bdb486c5a628f7a927c2658166e3a5ef1f883e7.tar.bz2
linux-stable-6bdb486c5a628f7a927c2658166e3a5ef1f883e7.zip
Merge 5.8-rc6 into driver-core-next
We need the driver core fixes in here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/humidity/hts221_buffer.c')
-rw-r--r--drivers/iio/humidity/hts221_buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c
index 9fb3f33614d4..ba7d413d75ba 100644
--- a/drivers/iio/humidity/hts221_buffer.c
+++ b/drivers/iio/humidity/hts221_buffer.c
@@ -160,7 +160,6 @@ static const struct iio_buffer_setup_ops hts221_buffer_ops = {
static irqreturn_t hts221_buffer_handler_thread(int irq, void *p)
{
- u8 buffer[ALIGN(2 * HTS221_DATA_SIZE, sizeof(s64)) + sizeof(s64)];
struct iio_poll_func *pf = p;
struct iio_dev *iio_dev = pf->indio_dev;
struct hts221_hw *hw = iio_priv(iio_dev);
@@ -170,18 +169,20 @@ static irqreturn_t hts221_buffer_handler_thread(int irq, void *p)
/* humidity data */
ch = &iio_dev->channels[HTS221_SENSOR_H];
err = regmap_bulk_read(hw->regmap, ch->address,
- buffer, HTS221_DATA_SIZE);
+ &hw->scan.channels[0],
+ sizeof(hw->scan.channels[0]));
if (err < 0)
goto out;
/* temperature data */
ch = &iio_dev->channels[HTS221_SENSOR_T];
err = regmap_bulk_read(hw->regmap, ch->address,
- buffer + HTS221_DATA_SIZE, HTS221_DATA_SIZE);
+ &hw->scan.channels[1],
+ sizeof(hw->scan.channels[1]));
if (err < 0)
goto out;
- iio_push_to_buffers_with_timestamp(iio_dev, buffer,
+ iio_push_to_buffers_with_timestamp(iio_dev, &hw->scan,
iio_get_time_ns(iio_dev));
out: