OSDN Git Service

i2c: replace i2c_new_probed_device with an ERR_PTR variant
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 6 Nov 2019 09:50:19 +0000 (10:50 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 28 Nov 2019 16:15:21 +0000 (17:15 +0100)
commitc1d084759c95ecd0ef08274654a1f6c4f343cdcd
tree6a2aef1231031772f0634fdb81909e23159fab9d
parent1b00ff61597e7b5758372ded5134f673dddc1831
i2c: replace i2c_new_probed_device with an ERR_PTR variant

In the general move to have i2c_new_*_device functions which return
ERR_PTR instead of NULL, this patch converts i2c_new_probed_device().

There are only few users, so this patch converts the I2C core and all
users in one go. The function gets renamed to i2c_new_scanned_device()
so out-of-tree users will get a build failure to understand they need to
adapt their error checking code.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Max Staudt <max@enpas.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Documentation/i2c/instantiating-devices.rst
Documentation/i2c/writing-clients.rst
drivers/i2c/i2c-core-base.c
include/linux/i2c.h