diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-10-14 17:30:06 +0200 |
---|---|---|
committer | Jean Delvare <khali@mahadeva.delvare> | 2008-10-14 17:30:06 +0200 |
commit | a10f9e7caf8d3028d8fb1d4c3d590492cde3df3e (patch) | |
tree | 46b3082ac2fedc4f49bae3fee2276d54923565b9 /drivers | |
parent | i2c: Only build Tyan SMBus mux drivers on x86 (diff) | |
download | linux-a10f9e7caf8d3028d8fb1d4c3d590492cde3df3e.tar.xz linux-a10f9e7caf8d3028d8fb1d4c3d590492cde3df3e.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/i2c-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index a96e1bf27649..80ae12048e85 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -986,7 +986,10 @@ static void __exit i2c_exit(void) bus_unregister(&i2c_bus_type); } -subsys_initcall(i2c_init); +/* We must initialize early, because some subsystems register i2c drivers + * in subsys_initcall() code, but are linked (and initialized) before i2c. + */ +postcore_initcall(i2c_init); module_exit(i2c_exit); /* ---------------------------------------------------- |