summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@gmail.com>2008-07-14 22:38:35 +0200
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 22:38:35 +0200
commite9ca9eb9d7fc7bf3dc3cec5ba7edb089c4625f7b (patch)
treeac395c8362e862f9dd4892bc37031dfc9c1bf67e
parentf09f71b24e77a2f2b4e5c98311c8804fc61ad8bc (diff)
i2c: Export the i2c_bus_type symbol
Export the root of the i2c bus so that PowerPC device tree code can iterate over devices on the i2c bus. Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/i2c-core.c3
-rw-r--r--include/linux/i2c.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index d6cc58abf3f..e45bb2838f4 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -201,7 +201,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,
@@ -212,6 +212,7 @@ static struct bus_type i2c_bus_type = {
.suspend = i2c_device_suspend,
.resume = i2c_device_resume,
};
+EXPORT_SYMBOL_GPL(i2c_bus_type);
/**
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 839d0ea3dca..50cbab4b62b 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -35,6 +35,8 @@
#include <linux/sched.h> /* for completion */
#include <linux/mutex.h>
+extern struct bus_type i2c_bus_type;
+
/* --- General options ------------------------------------------------ */
struct i2c_msg;