i2c: core: add managed function for adding i2c adapters
authorYicong Yang <yangyicong@hisilicon.com>
Thu, 8 Apr 2021 11:17:17 +0000 (19:17 +0800)
committerWolfram Sang <wsa@kernel.org>
Sat, 10 Apr 2021 19:53:49 +0000 (21:53 +0200)
commit07740c92ae57ca21204f1e0c6f59272cdf3190cc
tree3dabbe4ca22818052082e66a9fd208fa5dc446bc
parent2375843b50d6139b82648499daaad2034576905b
i2c: core: add managed function for adding i2c adapters

Some I2C controller drivers will only unregister the I2C
adapter in their .remove() callback, which can be done
by simply using a managed variant to add the I2C adapter.

So add the managed functions for adding the I2C adapter.

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