dbc4a9
From: Pantelis Antoniou <panto@antoniou-consulting.com>
dbc4a9
Date: Sat, 15 Sep 2012 12:00:41 +0300
dbc4a9
Subject: [PATCH] pinctrl: pinctrl-single must be initialized early.
dbc4a9
dbc4a9
When using pinctrl-single to handle i2c initialization, it has
dbc4a9
to be done early. Whether this is the best way to do so, is an
dbc4a9
exercise left to the reader.
dbc4a9
---
dbc4a9
 drivers/pinctrl/pinctrl-single.c | 12 +++++++++++-
dbc4a9
 1 file changed, 11 insertions(+), 1 deletion(-)
dbc4a9
dbc4a9
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
dbc4a9
index 95dd9cf55cb3..800fc34d7ea9 100644
dbc4a9
--- a/drivers/pinctrl/pinctrl-single.c
dbc4a9
+++ b/drivers/pinctrl/pinctrl-single.c
dbc4a9
@@ -2012,7 +2012,17 @@ static struct platform_driver pcs_driver = {
dbc4a9
 #endif
dbc4a9
 };
dbc4a9
 
dbc4a9
-module_platform_driver(pcs_driver);
dbc4a9
+static int __init pcs_init(void)
dbc4a9
+{
dbc4a9
+	return platform_driver_register(&pcs_driver);
dbc4a9
+}
dbc4a9
+postcore_initcall(pcs_init);
dbc4a9
+
dbc4a9
+static void __exit pcs_exit(void)
dbc4a9
+{
dbc4a9
+	platform_driver_unregister(&pcs_driver);
dbc4a9
+}
dbc4a9
+module_exit(pcs_exit);
dbc4a9
 
dbc4a9
 MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
dbc4a9
 MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");
dbc4a9
-- 
dbc4a9
1.9.3
dbc4a9