From: Marek Szyprowski Date: Tue, 31 Mar 2015 12:47:00 +0000 (+0200) Subject: i2c: exynos5: register driver early in subsys initcall to avoid probe defer X-Git-Tag: submit/tizen/20150416.081342~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=705b7938fcfe2b4eb04daf28e87f4a772b8110f0;p=platform%2Fkernel%2Flinux-exynos.git i2c: exynos5: register driver early in subsys initcall to avoid probe defer i2c bus drivers should be registered earlier than other drivers to let important i2c devices (like pmic) get registered early enough to avoid probe defer of other devices. Signed-off-by: Marek Szyprowski --- diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index b29c7500461a..934a5cbcbdd3 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -867,7 +867,17 @@ static struct platform_driver exynos5_i2c_driver = { }, }; -module_platform_driver(exynos5_i2c_driver); +static int __init i2c_adap_exynos5_i2c_init(void) +{ + return platform_driver_register(&exynos5_i2c_driver); +} +subsys_initcall(i2c_adap_exynos5_i2c_init); + +static void __exit i2c_adap_exynos5_i2c_exit(void) +{ + platform_driver_unregister(&exynos5_i2c_driver); +} +module_exit(i2c_adap_exynos5_i2c_exit); MODULE_DESCRIPTION("Exynos5 HS-I2C Bus driver"); MODULE_AUTHOR("Naveen Krishna Chatradhi, ");