From: Srinivas Neeli <srinivas.neeli@xilinx.com>
To: <linus.walleij@linaro.org>, <michal.simek@xilinx.com>,
<linux-gpio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <shubhrajyoti.datta@xilinx.com>
Cc: <git@xilinx.com>, <sgoud@xilinx.com>,
Srinivas Neeli <srinivas.neeli@xilinx.com>
Subject: [PATCH] pinctrl: zynq: use module_platform_driver to simplify the code
Date: Thu, 24 Feb 2022 10:06:05 +0530 [thread overview]
Message-ID: <20220224043605.26157-1-srinivas.neeli@xilinx.com> (raw)
module_platform_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-02-24 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 4:36 Srinivas Neeli [this message]
2022-03-15 0:47 ` [PATCH] pinctrl: zynq: use module_platform_driver to simplify the code Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220224043605.26157-1-srinivas.neeli@xilinx.com \
--to=srinivas.neeli@xilinx.com \
--cc=git@xilinx.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=sgoud@xilinx.com \
--cc=shubhrajyoti.datta@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).