iio: buffer-dmaengine: simplify __devm_iio_dmaengine_buffer_free()
authorYicong Yang <yangyicong@hisilicon.com>
Thu, 8 Apr 2021 11:38:11 +0000 (19:38 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:49:06 +0000 (13:49 +0100)
commit2c6a958789f79dedef3d661569f7faa7b375b538
treea2053952f7b1e57de2837ae128e98e42923f2899
parent4e023c4dcfc555e9a5f87435cae19412c0684343
iio: buffer-dmaengine: simplify __devm_iio_dmaengine_buffer_free()

Use devm_add_action_or_reset() instead of devres_alloc() and
devres_add(), which works the same. This will simplify the
code. There is no functional changes.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/1617881896-3164-3-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/buffer/industrialio-buffer-dmaengine.c