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>
This commit is contained in:
Jon Smirl 2008-07-14 22:38:35 +02:00 committed by Jean Delvare
parent f09f71b24e
commit e9ca9eb9d7
2 changed files with 4 additions and 1 deletions

View File

@ -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", .name = "i2c",
.dev_attrs = i2c_dev_attrs, .dev_attrs = i2c_dev_attrs,
.match = i2c_device_match, .match = i2c_device_match,
@ -212,6 +212,7 @@ static struct bus_type i2c_bus_type = {
.suspend = i2c_device_suspend, .suspend = i2c_device_suspend,
.resume = i2c_device_resume, .resume = i2c_device_resume,
}; };
EXPORT_SYMBOL_GPL(i2c_bus_type);
/** /**

View File

@ -35,6 +35,8 @@
#include <linux/sched.h> /* for completion */ #include <linux/sched.h> /* for completion */
#include <linux/mutex.h> #include <linux/mutex.h>
extern struct bus_type i2c_bus_type;
/* --- General options ------------------------------------------------ */ /* --- General options ------------------------------------------------ */
struct i2c_msg; struct i2c_msg;