diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-09-20 07:36:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-23 21:15:13 +0200 |
commit | 72b0a6503f8519980a4734bcdbb35a9ec6cd6347 (patch) | |
tree | 12513db7ebad9cbe7ad92b0de96922e8bef7b763 /drivers/i2c/i2c.c | |
parent | 33a8fa16c68139c50e839f647cc0b34250c75193 (diff) | |
download | barebox-72b0a6503f8519980a4734bcdbb35a9ec6cd6347.tar.gz barebox-72b0a6503f8519980a4734bcdbb35a9ec6cd6347.tar.xz |
driver: register bus
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/i2c/i2c.c')
-rw-r--r-- | drivers/i2c/i2c.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c index 555722b67f..27fd256cf7 100644 --- a/drivers/i2c/i2c.c +++ b/drivers/i2c/i2c.c @@ -21,6 +21,7 @@ #include <errno.h> #include <malloc.h> #include <xfuncs.h> +#include <init.h> #include <i2c/i2c.h> @@ -395,3 +396,9 @@ struct bus_type i2c_bus = { .probe = i2c_probe, .remove = i2c_remove, }; + +static int i2c_bus_init(void) +{ + return bus_register(&i2c_bus); +} +pure_initcall(i2c_bus_init); |