Commit 82cc6318 authored by Nuno Sa's avatar Nuno Sa Committed by Jonathan Cameron

iio: buffer-dmaengine: make use of the 'struct device *' argument

Respect the @dev argument in devm_iio_dmaengine_buffer_setup() and bind the
IIO DMA buffer lifetime to that device.

For the only user of this function, the IIO parent device is the
struct device being passed to the API so no real fix in here (just
consistency with other IIO APIs).
Signed-off-by: default avatarNuno Sa <nuno.sa@analog.com>
Reviewed-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240109-dmaengine_use_device-v1-1-1cbdb7fe9f29@analog.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent e7748c17
......@@ -279,8 +279,7 @@ int devm_iio_dmaengine_buffer_setup(struct device *dev,
{
struct iio_buffer *buffer;
buffer = devm_iio_dmaengine_buffer_alloc(indio_dev->dev.parent,
channel);
buffer = devm_iio_dmaengine_buffer_alloc(dev, channel);
if (IS_ERR(buffer))
return PTR_ERR(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