Skip to content

Commit abef6bc

Browse files
commodoJonathan Cameron
authored andcommitted
iio: accel: adxl372: use devm_iio_triggered_buffer_setup_ext()
This change switches to the new devm_iio_triggered_buffer_setup_ext() function and removes the iio_buffer_set_attrs() call, for assigning the HW FIFO attributes to the buffer. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200929125949.69934-5-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 5164c78 commit abef6bc

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎drivers/iio/accel/adxl372.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,15 +1211,14 @@ int adxl372_probe(struct device *dev, struct regmap *regmap,
12111211
return ret;
12121212
}
12131213

1214-
ret = devm_iio_triggered_buffer_setup(dev,
1215-
indio_dev, NULL,
1216-
adxl372_trigger_handler,
1217-
&adxl372_buffer_ops);
1214+
ret = devm_iio_triggered_buffer_setup_ext(dev,
1215+
indio_dev, NULL,
1216+
adxl372_trigger_handler,
1217+
&adxl372_buffer_ops,
1218+
adxl372_fifo_attributes);
12181219
if (ret < 0)
12191220
return ret;
12201221

1221-
iio_buffer_set_attrs(indio_dev->buffer, adxl372_fifo_attributes);
1222-
12231222
if (st->irq) {
12241223
st->dready_trig = devm_iio_trigger_alloc(dev,
12251224
"%s-dev%d",

0 commit comments

Comments
 (0)