From: David Brownell Date: Tue, 14 Oct 2008 15:30:05 +0000 (+0200) Subject: i2c: Guard against oopses from bad init sequences X-Git-Tag: v2.6.28-rc1~570^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d0b19c9a0612c653d1a0df267ba159089f6d139;p=pandora-kernel.git i2c: Guard against oopses from bad init sequences Guard I2C against oopsing because of init sequence problems, by verifying that i2c_init() has been called before calling any routines that rely on that initialization. This specific test just requires that bus_register(&i2c_bus_type) was called. Examples of this kind of oopsing come from subystems and drivers which register I2C drivers in their subsys_initcall code but which are statically linked before I2C by drivers/Makefile. Signed-off-by: David Brownell Signed-off-by: Jean Delvare --- Reading git-diff-tree failed