diff options
author | Srinivas Neeli <srinivas.neeli@xilinx.com> | 2022-02-24 05:36:05 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-03-15 01:46:13 +0100 |
commit | d5140268a38d5eedd4f92ffe9a5abef9317c576c (patch) | |
tree | 83e5ee8ef16e58ecdb456f7f1902647969efbf3d /drivers/pinctrl/pinctrl-zynq.c | |
parent | pinctrl: qcom: cleanup comments (diff) | |
download | linux-d5140268a38d5eedd4f92ffe9a5abef9317c576c.tar.xz linux-d5140268a38d5eedd4f92ffe9a5abef9317c576c.zip |
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@xilinx.com>
Link: https://lore.kernel.org/r/20220224043605.26157-1-srinivas.neeli@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.c | 7 |
1 files 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); |