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