aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-10-14 11:30:06 -0400
committerJean Delvare <khali@mahadeva.delvare>2008-10-14 11:30:06 -0400
commita10f9e7caf8d3028d8fb1d4c3d590492cde3df3e (patch)
tree46b3082ac2fedc4f49bae3fee2276d54923565b9
parentf1453ee3a4da94250849606882948c590a4ad8dd (diff)
i2c: Do earlier driver model init
Move I2C driver model init earlier in the boot sequence. This avoids oopsing in statically linked systems when some subsystems register I2C drivers in subsys_initcall() code, but those subsystems are linked (and initialized) before I2C. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/i2c-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index a96e1bf2764..80ae12048e8 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -986,7 +986,10 @@ static void __exit i2c_exit(void)
986 bus_unregister(&i2c_bus_type); 986 bus_unregister(&i2c_bus_type);
987} 987}
988 988
989subsys_initcall(i2c_init); 989/* We must initialize early, because some subsystems register i2c drivers
990 * in subsys_initcall() code, but are linked (and initialized) before i2c.
991 */
992postcore_initcall(i2c_init);
990module_exit(i2c_exit); 993module_exit(i2c_exit);
991 994
992/* ---------------------------------------------------- 995/* ----------------------------------------------------