i2c: add newly exported functions to the header, too
PATCH 1/1 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 <[email protected]>
--- drivers/i2c/i2c-core-base.c | 5 ++--- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/i2c/i2c-core-base.c +2 -3
@@ -721,7 +721,7 @@ static int i2c_dev_irq_from_resources(const struct resource *resources,* This returns the new i2c client, which may be saved for later use with * i2c_unregister_device(); or an ERR_PTR to describe the error. */ -static struct i2c_client * +struct i2c_client *i2c_new_client_device (struct i2c_adapter *adap,struct i2c_board_info const *info) {struct i2c_client *client;
@@ -887,8 +887,7 @@ static struct i2c_driver dummy_driver = {* This returns the new i2c client, which should be saved for later use with * i2c_unregister_device(); or an ERR_PTR to describe the error. */ -static struct i2c_client * -i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address) +struct i2c_client *i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address) {struct i2c_board_info info = {I2C_BOARD_INFO ("dummy" , address),
include/linux/i2c.h +6 -0
@@ -436,6 +436,9 @@ struct i2c_board_info {extern struct i2c_client *i2c_new_device (struct i2c_adapter *adap,struct i2c_board_info const *info); +extern struct i2c_client * +i2c_new_client_device (struct i2c_adapter *adap,struct i2c_board_info const *info); +/* If you don't know the exact address of an I2C device, use this variant * instead, which can probe for device presence in a list of possible * addresses. The "probe" callback function is optional. If it is provided,
@@ -457,6 +460,9 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr);extern struct i2c_client *i2c_new_dummy (struct i2c_adapter *adap,u16 address); +extern struct i2c_client * +i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address); +extern struct i2c_client *devm_i2c_new_dummy_device (struct device *dev,struct i2c_adapter *adap,u16 address);
Signature · 1 line
2.19.1
pon., 24 cze 2019 o 19:04 Wolfram Sang
<[email protected]> napisał(a):
Quoted 59 lines
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 <[email protected]>--- drivers/i2c/i2c-core-base.c | 5 ++--- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-)drivers/i2c/i2c-core-base.c +2
-3@@ -721,7 +721,7 @@ static int i2c_dev_irq_from_resources(const struct resource *resources,* This returns the new i2c client, which may be saved for later use with * i2c_unregister_device(); or an ERR_PTR to describe the error. */ -static struct i2c_client * +struct i2c_client *i2c_new_client_device (struct i2c_adapter *adap,struct i2c_board_info const *info) {struct i2c_client *client;@@ -887,8 +887,7 @@ static struct i2c_driver dummy_driver = {* This returns the new i2c client, which should be saved for later use with * i2c_unregister_device(); or an ERR_PTR to describe the error. */ -static struct i2c_client * -i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address) +struct i2c_client *i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address) {struct i2c_board_info info = {I2C_BOARD_INFO ("dummy" , address),include/linux/i2c.h +6
-1@@ -436,6 +436,9 @@ struct i2c_board_info {extern struct i2c_client *i2c_new_device (struct i2c_adapter *adap,struct i2c_board_info const *info); +extern struct i2c_client * +i2c_new_client_device (struct i2c_adapter *adap,struct i2c_board_info const *info); +/* If you don't know the exact address of an I2C device, use this variant * instead, which can probe for device presence in a list of possible * addresses. The "probe" callback function is optional. If it is provided, @@ -457,6 +460,9 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr);extern struct i2c_client *i2c_new_dummy (struct i2c_adapter *adap,u16 address); +extern struct i2c_client * +i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address); +extern struct i2c_client *devm_i2c_new_dummy_device (struct device *dev,struct i2c_adapter *adap,u16 address); --
Quoted 2 lines
2.19.1
Ha! How about that? :)
Reviewed-by Bartosz Golaszewski <[email protected]>
Hi Wolfram,
Quoted 3 lines · Wolfram Sang
Nobody (including me) noticed that these functions were exported but not added to the header :/
A small, minor detail :D
Reviewed-by Kieran Bingham <[email protected]>
Quoted 55 lines
Fixes 7159dbdae3c5 ("i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy")Signed-off-by Wolfram Sang <[email protected]>--- drivers/i2c/i2c-core-base.c | 5 ++--- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-)drivers/i2c/i2c-core-base.c +2
-3@@ -721,7 +721,7 @@ static int i2c_dev_irq_from_resources(const struct resource *resources,* This returns the new i2c client, which may be saved for later use with * i2c_unregister_device(); or an ERR_PTR to describe the error. */ -static struct i2c_client * +struct i2c_client *i2c_new_client_device (struct i2c_adapter *adap,struct i2c_board_info const *info) {struct i2c_client *client;@@ -887,8 +887,7 @@ static struct i2c_driver dummy_driver = {* This returns the new i2c client, which should be saved for later use with * i2c_unregister_device(); or an ERR_PTR to describe the error. */ -static struct i2c_client * -i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address) +struct i2c_client *i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address) {struct i2c_board_info info = {I2C_BOARD_INFO ("dummy" , address),include/linux/i2c.h +6
-0@@ -436,6 +436,9 @@ struct i2c_board_info {extern struct i2c_client *i2c_new_device (struct i2c_adapter *adap,struct i2c_board_info const *info); +extern struct i2c_client * +i2c_new_client_device (struct i2c_adapter *adap,struct i2c_board_info const *info); +/* If you don't know the exact address of an I2C device, use this variant * instead, which can probe for device presence in a list of possible * addresses. The "probe" callback function is optional. If it is provided, @@ -457,6 +460,9 @@ extern int i2c_probe_func_quick_read(struct i2c_adapter *, unsigned short addr);extern struct i2c_client *i2c_new_dummy (struct i2c_adapter *adap,u16 address); +extern struct i2c_client * +i2c_new_dummy_device (struct i2c_adapter *adapter,u16 address); +extern struct i2c_client *devm_i2c_new_dummy_device (struct device *dev,struct i2c_adapter *adap,u16 address);
Wolfram Sang
AppliedQuoted 5 lines · Wolfram Sang
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 <[email protected]>
Applied to for-next, thanks!