Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-2-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Alexandru Ardelean and committed by
Jonathan Cameron
5e6dc43e ee4fb4c0

+1 -2
+1 -2
drivers/iio/buffer/industrialio-buffer-dmaengine.c
··· 200 200 201 201 iio_dma_buffer_init(&dmaengine_buffer->queue, chan->device->dev, 202 202 &iio_dmaengine_default_ops); 203 - iio_buffer_set_attrs(&dmaengine_buffer->queue.buffer, 204 - iio_dmaengine_buffer_attrs); 205 203 204 + dmaengine_buffer->queue.buffer.attrs = iio_dmaengine_buffer_attrs; 206 205 dmaengine_buffer->queue.buffer.access = &iio_dmaengine_buffer_ops; 207 206 208 207 return &dmaengine_buffer->queue.buffer;