From: Nuno Sa Date: Tue, 9 Jan 2024 14:03:16 +0000 (+0100) Subject: iio: buffer-dmaengine: make use of the 'struct device *' argument X-Git-Tag: v6.9-rc1~35^2~70^2~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82cc631881206827570d2d84e8a22524afe3638f;p=thirdparty%2Flinux.git 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 Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20240109-dmaengine_use_device-v1-1-1cbdb7fe9f29@analog.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c index 5f85ba38e6f6e..45fe7d0d42ee0 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);