linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: exynos5: Move initialization code to subsys_initcall()
@ 2015-01-12  2:53 Joonyoung Shim
       [not found] ` <1421031182-18992-1-git-send-email-jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Joonyoung Shim @ 2015-01-12  2:53 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-samsung-soc, wsa, kgene.kim, naveenkrishna.ch, broonie,
	jy0922.shim

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@samsung.com>
---
 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@samsung.com>");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-16 12:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12  2:53 [PATCH] i2c: exynos5: Move initialization code to subsys_initcall() Joonyoung Shim
     [not found] ` <1421031182-18992-1-git-send-email-jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-12  7:50   ` Uwe Kleine-König
     [not found]     ` <20150112075019.GB22880-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-12  8:43       ` Joonyoung Shim
     [not found]         ` <54B38946.3020406-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-13 12:13           ` Tomi Valkeinen
2015-01-16 12:35             ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).