Skip to contentSkip to conversation

Fix kobject_get oopses triggered by i2c in 2.5.65-bk

PATCH In review Petr Vandrovec 2 participants 2 messages Mar 21, 2003 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix kobject_get oopses triggered by i2c in 2.5.65-bk

Hi,

i2c initialization must not use module_init now, when it was converted to the kobject interface. There are dozens of users which need it working much sooner. i2c is subsystem after all, isn't it?

Fixes kernel oopses in kobject_get during system init which were happening to me.

Petr Vandrovec [email protected]

drivers/i2c/i2c-core.c +1 -1
@@ -675,7 +675,7 @@
 	bus_unregister(&i2c_bus_type);
 }
 
-module_init(i2c_init);
+subsys_initcall(i2c_init);
 module_exit(i2c_exit);
 
 /* ----------------------------------------------------
#1 lore raw
Quoted 8 lines · Petr Vandrovec

Hi,

i2c initialization must not use module_init now, when it was converted to the kobject interface. There are dozens of users which need it working much sooner. i2c is subsystem after all, isn't it?

Fixes kernel oopses in kobject_get during system init which were happening to me.

Thanks, I've added this to my tree, and will send it on to Linus in the next round of i2c changes.

thanks,

greg k-h