summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-06-24 13:04:02 -0400
committerWolfram Sang <wsa@the-dreams.de>2019-06-26 09:10:35 -0400
commit550113d4e9f5c7b62be760fc01178c9e0139c1f4 (patch)
tree0f8fb5f7c522d176534315af14ec7a9ad1749a45
parent57ca968b69ecb741f6f8e643666e21635b6828bc (diff)
i2c: add newly exported functions to the header, too
Nobody (including me) noticed that these functions were exported but not added to the header :/ Fixes: 7159dbdae3c5 ("i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/i2c-core-base.c5
-rw-r--r--include/linux/i2c.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index e7d5ada40d48..f1949d1e2b54 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -729,7 +729,7 @@ static int i2c_dev_irq_from_resources(const struct resource *resources,
729 * This returns the new i2c client, which may be saved for later use with 729 * This returns the new i2c client, which may be saved for later use with
730 * i2c_unregister_device(); or an ERR_PTR to describe the error. 730 * i2c_unregister_device(); or an ERR_PTR to describe the error.
731 */ 731 */
732static struct i2c_client * 732struct i2c_client *
733i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info) 733i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
734{ 734{
735 struct i2c_client *client; 735 struct i2c_client *client;
@@ -895,8 +895,7 @@ static struct i2c_driver dummy_driver = {
895 * This returns the new i2c client, which should be saved for later use with 895 * This returns the new i2c client, which should be saved for later use with
896 * i2c_unregister_device(); or an ERR_PTR to describe the error. 896 * i2c_unregister_device(); or an ERR_PTR to describe the error.
897 */ 897 */
898static struct i2c_client * 898struct i2c_client *i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address)
899i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address)
900{ 899{
901 struct i2c_board_info info = { 900 struct i2c_board_info info = {
902 I2C_BOARD_INFO("dummy", address), 901 I2C_BOARD_INFO("dummy", address),
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index d8f9060179d0..fa5552c2307b 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -442,6 +442,9 @@ struct i2c_board_info {
442extern struct i2c_client * 442extern struct i2c_client *
443i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info); 443i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info);
444 444
445extern struct i2c_client *
446i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info);
447
445/* If you don't know the exact address of an I2C device, use this variant 448/* If you don't know the exact address of an I2C device, use this variant
446 * instead, which can probe for device presence in a list of possible 449 * instead, which can probe for device presence in a list of possible
447 * addresses. The "probe" callback function is optional. If it is provided, 450 * addresses. The "probe" callback function is optional. If it is provided,
@@ -464,6 +467,9 @@ extern struct i2c_client *
464i2c_new_dummy(struct i2c_adapter *adap, u16 address); 467i2c_new_dummy(struct i2c_adapter *adap, u16 address);
465 468
466extern struct i2c_client * 469extern struct i2c_client *
470i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address);
471
472extern struct i2c_client *
467devm_i2c_new_dummy_device(struct device *dev, struct i2c_adapter *adap, u16 address); 473devm_i2c_new_dummy_device(struct device *dev, struct i2c_adapter *adap, u16 address);
468 474
469extern struct i2c_client * 475extern struct i2c_client *