diff options
author | Nuno Sa <nuno.sa@analog.com> | 2024-01-09 17:03:16 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-01-24 01:06:56 +0300 |
commit | 82cc631881206827570d2d84e8a22524afe3638f (patch) | |
tree | 7a36e32a939751fb7dd8fc517f28b6b50994ab8f /drivers/iio/buffer | |
parent | e7748c17bda04758a01f1241896b553f8b3873cc (diff) | |
download | linux-82cc631881206827570d2d84e8a22524afe3638f.tar.xz |
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: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240109-dmaengine_use_device-v1-1-1cbdb7fe9f29@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/buffer')
-rw-r--r-- | drivers/iio/buffer/industrialio-buffer-dmaengine.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c index 5f85ba38e6f6..45fe7d0d42ee 100644 --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c @@ -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); |