Skip to contentSkip to conversation

i2c: core: Export bus recovery functions

PATCH Applied Mark Brown 2 participants 2 messages Apr 15, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 i2c: core: Export bus recovery functions

Current -next fails to link an ARM allmodconfig because drivers that use the core recovery functions can be built as modules but those functions are not exported:

ERROR: "i2c_generic_gpio_recovery" [drivers/i2c/busses/i2c-davinci.ko] undefined!
ERROR: "i2c_generic_scl_recovery" [drivers/i2c/busses/i2c-davinci.ko] undefined!
ERROR: "i2c_recover_bus" [drivers/i2c/busses/i2c-davinci.ko] undefined!

Add exports to fix this.

Fixes 5f9296ba21b3c (i2c: Add bus recovery infrastructure)
---
 drivers/i2c/i2c-core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/i2c/i2c-core.c +3 -0
index 1672e6b12774..098f698fe8f4 100644
@@ -596,6 +596,7 @@ int i2c_generic_scl_recovery(struct i2c_adapter *adap)
 	adap->bus_recovery_info->set_scl(adap, 1);
 	return i2c_generic_recovery(adap);
 }
+EXPORT_SYMBOL_GPL(i2c_generic_scl_recovery);
 
 int i2c_generic_gpio_recovery(struct i2c_adapter *adap)
 {
@@ -610,6 +611,7 @@ int i2c_generic_gpio_recovery(struct i2c_adapter *adap)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(i2c_generic_gpio_recovery);
 
 int i2c_recover_bus(struct i2c_adapter *adap)
 {
@@ -619,6 +621,7 @@ int i2c_recover_bus(struct i2c_adapter *adap)
 	dev_dbg(&adap->dev, "Trying i2c bus recovery\n");
 	return adap->bus_recovery_info->recover_bus(adap);
 }
+EXPORT_SYMBOL_GPL(i2c_recover_bus);
 
 static int i2c_device_probe(struct device *dev)
 {
Signature · 1 line
2.1.4

A message that is not in the archive (sent off-list or not yet received): 1429121919-1448-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

Applied
#2 lore raw
Quoted 4 lines · Mark Brown

Current -next fails to link an ARM allmodconfig because drivers that use the core recovery functions can be built as modules but those functions are not exported:

Quoted 8 lines

ERROR: "i2c_generic_gpio_recovery" [drivers/i2c/busses/i2c-davinci.ko] undefined!
ERROR: "i2c_generic_scl_recovery" [drivers/i2c/busses/i2c-davinci.ko] undefined!
ERROR: "i2c_recover_bus" [drivers/i2c/busses/i2c-davinci.ko] undefined!

Add exports to fix this.

Fixes 5f9296ba21b3c (i2c: Add bus recovery infrastructure)

Thanks, I was just about to implement the same.

Applied to for-next, thanks!