Commit 5e6dc43e authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron

iio: buffer: dmaengine: unwrap the use of iio_buffer_set_attrs()

The iio_buffer_set_attrs() helper will be removed in this series. So, just
assign the attributes of the DMAEngine buffer logic directly.

This is IIO buffer core context, so there is direct access to the
buffer->attrs object.
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-2-alexandru.ardelean@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ee4fb4c0
......@@ -200,9 +200,8 @@ static struct iio_buffer *iio_dmaengine_buffer_alloc(struct device *dev,
iio_dma_buffer_init(&dmaengine_buffer->queue, chan->device->dev,
&iio_dmaengine_default_ops);
iio_buffer_set_attrs(&dmaengine_buffer->queue.buffer,
iio_dmaengine_buffer_attrs);
dmaengine_buffer->queue.buffer.attrs = iio_dmaengine_buffer_attrs;
dmaengine_buffer->queue.buffer.access = &iio_dmaengine_buffer_ops;
return &dmaengine_buffer->queue.buffer;
......
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