Thread (6 messages) 6 messages, 3 authors, 2021-06-14

RE: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code

From: Srinivas Neeli <hidden>
Date: 2021-04-14 14:46:04
Also in: linux-gpio, lkml

HI baratosz and Andy,
-----Original Message-----
From: Bartosz Golaszewski <redacted>
Sent: Tuesday, April 13, 2021 4:14 PM
To: Andy Shevchenko <redacted>
Cc: Srinivas Neeli <redacted>; linus.walleij@linaro.org; Michal Simek
[off-list ref]; Shubhrajyoti Datta [off-list ref]; Srinivas
Goud [off-list ref]; linux-gpio@vger.kernel.org; linux-arm-
kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git
[off-list ref]
Subject: Re: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify
the code

On Sat, Apr 10, 2021 at 12:08 AM Andy Shevchenko
[off-list ref] wrote:
quoted


On Friday, April 9, 2021, Srinivas Neeli [off-list ref] wrote:
quoted
module_platform_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Srinivas Neeli <redacted>
---
 drivers/gpio/gpio-zynq.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 3521c1dc3ac0..bb1ac0c5cf26 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -1020,22 +1020,7 @@ static struct platform_driver zynq_gpio_driver
= {
quoted
quoted
        .remove = zynq_gpio_remove,
 };

-/**
- * zynq_gpio_init - Initial driver registration call
- *
- * Return: value from platform_driver_register
- */
-static int __init zynq_gpio_init(void) -{
-       return platform_driver_register(&zynq_gpio_driver);
-}
-postcore_initcall(zynq_gpio_init);


It’s not an equivalent. Have you tested on actual hardware? If no, there is
no go for this change.
quoted
Yep, this has been like this since the initial introduction of this driver.
Unfortunately there's no documented reason so unless we can test it, it has
to stay this way.
I tested driver, functionality wise everything working fine.
Based on below conversation, I moved driver to module driver.
https://lore.kernel.org/patchwork/patch/818202/

Thanks
Srinivas Neeli
Bartosz
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help