[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220224043605.26157-1-srinivas.neeli@xilinx.com>
Date: Thu, 24 Feb 2022 10:06:05 +0530
From: Srinivas Neeli <srinivas.neeli@...inx.com>
To: <linus.walleij@...aro.org>, <michal.simek@...inx.com>,
<linux-gpio@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <shubhrajyoti.datta@...inx.com>
CC: <git@...inx.com>, <sgoud@...inx.com>,
Srinivas Neeli <srinivas.neeli@...inx.com>
Subject: [PATCH] pinctrl: zynq: use module_platform_driver to simplify the code
module_platform_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Srinivas Neeli <srinivas.neeli@...inx.com>
---
drivers/pinctrl/pinctrl-zynq.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
index a96af8a76a7a..0e8de27d0de8 100644
--- a/drivers/pinctrl/pinctrl-zynq.c
+++ b/drivers/pinctrl/pinctrl-zynq.c
@@ -8,6 +8,7 @@
*/
#include <linux/io.h>
#include <linux/mfd/syscon.h>
+#include <linux/module.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
@@ -1210,8 +1211,4 @@ static struct platform_driver zynq_pinctrl_driver = {
.probe = zynq_pinctrl_probe,
};
-static int __init zynq_pinctrl_init(void)
-{
- return platform_driver_register(&zynq_pinctrl_driver);
-}
-arch_initcall(zynq_pinctrl_init);
+module_platform_driver(zynq_pinctrl_driver);
--
2.17.1
Powered by blists - more mailing lists