iio: core: simplify some devm functions
authorYicong Yang <yangyicong@hisilicon.com>
Thu, 8 Apr 2021 11:38:14 +0000 (19:38 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:49:07 +0000 (13:49 +0100)
commitcf5724e91515e8b016019b148c99bdf7c58f3ab7
tree2000b1808b57df476e4f40ee366c12de603ac0b3
parent8e39d4723a00cfc7029e61f7bd9ffa357409f9d2
iio: core: simplify some devm functions

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-6-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c