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
cc7213f
index 13b45f297727..f84ce0135c38 100644
6a91557
--- a/drivers/pinctrl/pinctrl-single.c
6a91557
+++ b/drivers/pinctrl/pinctrl-single.c
208228c
@@ -2025,7 +2025,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");