Skip to content

Commit

Permalink
i2c: Export the i2c_bus_type symbol
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
  • Loading branch information
jonsmirl authored and Jean Delvare committed Jul 14, 2008
1 parent f09f71b commit e9ca9eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);


/**
Expand Down
2 changes: 2 additions & 0 deletions include/linux/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e9ca9eb

Please sign in to comment.