summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-zynq.c
diff options
context:
space:
mode:
authorMike Looijmans <mike.looijmans@topic.nl>2015-10-22 13:30:20 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-10-30 10:40:57 +0100
commit13e3008fae342c86dd645b2ec4c669bbb40c5d33 (patch)
tree1dc6c55d975e30ecc248ea2a9106c3ab71601c13 /drivers/pinctrl/pinctrl-zynq.c
parentd94b986aa734efea09fbc8f59390ba2e4e00f9d0 (diff)
pinctrl: zynq: Initialize early
Supplying pinmux configuration for e.g. gpio pins leads to deferred probes because the pinctrl device is probed much later than gpio. Move the init call to a much earlier stage so it probes before the devices that may need it. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Tested-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-zynq.c')
-rw-r--r--drivers/pinctrl/pinctrl-zynq.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
index 5aafea8c6590..9aefc608ba79 100644
--- a/drivers/pinctrl/pinctrl-zynq.c
+++ b/drivers/pinctrl/pinctrl-zynq.c
@@ -1230,7 +1230,17 @@ static struct platform_driver zynq_pinctrl_driver = {
.remove = zynq_pinctrl_remove,
};
-module_platform_driver(zynq_pinctrl_driver);
+static int __init zynq_pinctrl_init(void)
+{
+ return platform_driver_register(&zynq_pinctrl_driver);
+}
+arch_initcall(zynq_pinctrl_init);
+
+static void __exit zynq_pinctrl_exit(void)
+{
+ platform_driver_unregister(&zynq_pinctrl_driver);
+}
+module_exit(zynq_pinctrl_exit);
MODULE_AUTHOR("Sören Brinkmann <soren.brinkmann@xilinx.com>");
MODULE_DESCRIPTION("Xilinx Zynq pinctrl driver");