From: Marek Szyprowski Date: Fri, 21 May 2010 16:40:58 +0000 (+0200) Subject: i2c-gpio: Move initialization code to subsys_initcall() X-Git-Tag: v2.6.35-rc1~457^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8680784875b26a2876df5959673a496d56af673;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git i2c-gpio: Move initialization code to subsys_initcall() GPIO driven I2C bus can be used for controlling the PMIC chip. The example of such configuration is Samsung Aquila board. This patch moves initialization code to subsys_initcall() to ensure that the i2c bus is available early so the regulators can be quickly probed and available for other devices on their probe() call. Such solution has been proposed by Mark Brown to fix the problem of the regulators not beeing available on the peripheral device probe(): http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html Cc: Mark Brown Reviewed-by: Kyungmin Park Signed-off-by: Marek Szyprowski Acked-by: Wolfram Sang Signed-off-by: Jean Delvare --- diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index c21077d..d9aa9a6 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -211,7 +211,7 @@ static int __init i2c_gpio_init(void) return ret; } -module_init(i2c_gpio_init); +subsys_initcall(i2c_gpio_init); static void __exit i2c_gpio_exit(void) {