Skip to contentSkip to conversation

Export the i2c_bus_type symbol, standalone V1

PATCH Applied Jon Smirl 2 participants 2 messages Jul 1, 2008 – Jul 2, 2008

Subsystems (2)
lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

PATCH 1/1 Export the i2c_bus_type symbol, standalone V1

Export the root of the i2c bus so that PowerPC device tree code can iterate over devices on the i2c bus.

---

 drivers/i2c/i2c-core.c |    3 ++-
 include/linux/i2c.h    |    3 +++
 2 files changed, 5 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +2 -1
index d0175f4..05866ef 100644
@@ -208,7 +208,7 @@ static struct device_attribute i2c_dev_attrs[] = {
 	{ },
 };
 
-static struct bus_type i2c_bus_type = {
+struct bus_type i2c_bus_type = {
 	.name		= "i2c",
 	.dev_attrs	= i2c_dev_attrs,
 	.match		= i2c_device_match,
@@ -219,6 +219,7 @@ static struct bus_type i2c_bus_type = {
 	.suspend	= i2c_device_suspend,
 	.resume		= i2c_device_resume,
 };
+EXPORT_SYMBOL_GPL(i2c_bus_type);
 
 
 /**
include/linux/i2c.h +3 -0
index fb9af6a..186b22d 100644
@@ -92,6 +92,9 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
 extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
 					  u8 command, u8 length,
 					  const u8 *values);
+					  
+/* Base of the i2c bus */
+extern struct bus_type i2c_bus_type; 
 
 /*
  * A driver is capable of handling one or more physical devices present on

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Applied
#1 lore raw

Hi Jon,

Quoted 35 lines · Jon Smirl

Export the root of the i2c bus so that PowerPC device tree code can iterate over devices on the i2c bus.

---

 drivers/i2c/i2c-core.c |    3 ++-
 include/linux/i2c.h    |    3 +++
 2 files changed, 5 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +2 -1
index d0175f4..05866ef 100644
@@ -208,7 +208,7 @@ static struct device_attribute i2c_dev_attrs[] = {
 	{ },
 };
 
-static struct bus_type i2c_bus_type = {
+struct bus_type i2c_bus_type = {
 	.name		= "i2c",
 	.dev_attrs	= i2c_dev_attrs,
 	.match		= i2c_device_match,
@@ -219,6 +219,7 @@ static struct bus_type i2c_bus_type = {
 	.suspend	= i2c_device_suspend,
 	.resume		= i2c_device_resume,
 };
+EXPORT_SYMBOL_GPL(i2c_bus_type);
 
 
 /**
include/linux/i2c.h +0 -0
index fb9af6a..186b22d 100644

include/linux/i2c.h extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, · line 100

Quoted 9 lines
include/linux/i2c.h +3 -0
@@ -92,6 +92,9 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
 extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
 					  u8 command, u8 length,
 					  const u8 *values);
+					  
+/* Base of the i2c bus */
+extern struct bus_type i2c_bus_type; 
 
 /*
  * A driver is capable of handling one or more physical devices present on

Applied, thanks.

Signature · 6 lines
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c