i2c: core: simplify devm_i2c_new_dummy_device()
authorYicong Yang <yangyicong@hisilicon.com>
Thu, 8 Apr 2021 12:17:40 +0000 (20:17 +0800)
committerWolfram Sang <wsa@kernel.org>
Thu, 8 Apr 2021 21:00:12 +0000 (23:00 +0200)
commitbb7f086b8404e70ac2891ba539f959805f1684b0
treedcb33049c98945380df30f15f9f29bfac7867d79
parent3ab4ce2daf09b62e38934a7afe3e9fc3f3cbcdec
i2c: core: simplify devm_i2c_new_dummy_device()

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 change.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-base.c