[PATCH 16/25] Move I2C driver model init earlier in the boot sequence

Felipe Balbi
2008-09-30T18:46:12Z

From: David Brownell <dbrownell@users.sourceforge.net>

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: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/i2c/i2c-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index b346a68..f520108 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -978,7 +978,7 @@ static void __exit i2c_exit(void)
bus_unregister(&i2c_bus_type);
}

-subsys_initcall(i2c_init);
+postcore_initcall(i2c_init);
module_exit(i2c_exit);

/* ----------------------------------------------------
--
1.6.0.1.196.g01914