Commit abef6bc9 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron

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: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-5-alexandru.ardelean@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5164c788
...@@ -1211,15 +1211,14 @@ int adxl372_probe(struct device *dev, struct regmap *regmap, ...@@ -1211,15 +1211,14 @@ int adxl372_probe(struct device *dev, struct regmap *regmap,
return ret; return ret;
} }
ret = devm_iio_triggered_buffer_setup(dev, ret = devm_iio_triggered_buffer_setup_ext(dev,
indio_dev, NULL, indio_dev, NULL,
adxl372_trigger_handler, adxl372_trigger_handler,
&adxl372_buffer_ops); &adxl372_buffer_ops,
adxl372_fifo_attributes);
if (ret < 0) if (ret < 0)
return ret; return ret;
iio_buffer_set_attrs(indio_dev->buffer, adxl372_fifo_attributes);
if (st->irq) { if (st->irq) {
st->dready_trig = devm_iio_trigger_alloc(dev, st->dready_trig = devm_iio_trigger_alloc(dev,
"%s-dev%d", "%s-dev%d",
......
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