]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
i2c: Guard against oopses from bad init sequences
authorDavid Brownell <dbrownell@users.sourceforge.net>
Tue, 14 Oct 2008 15:30:05 +0000 (17:30 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Tue, 14 Oct 2008 15:30:05 +0000 (17:30 +0200)
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 <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

No differences found