[PATCH] i2c: exynos5: Move initialization code to subsys_initcall()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is required in order to ensure that core system devices such as
voltage regulators attached via I2C are available early in boot.

Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
---
 drivers/i2c/busses/i2c-exynos5.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index b29c750..18ca097 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 exynos5_i2c_init_driver(void)
+{
+	return platform_driver_register(&exynos5_i2c_driver);
+}
+subsys_initcall(exynos5_i2c_init_driver);
+
+static void __exit exynos5_i2c_exit_driver(void)
+{
+	platform_driver_unregister(&exynos5_i2c_driver);
+}
+module_exit(exynos5_i2c_exit_driver);
 
 MODULE_DESCRIPTION("Exynos5 HS-I2C Bus driver");
 MODULE_AUTHOR("Naveen Krishna Chatradhi, <ch.naveen@xxxxxxxxxxx>");
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux