* [PATCH v2] gpio: max77620: remove unneeded platform_set_drvdata() call
@ 2023-07-25 12:36 Andrei Coardos
2023-07-25 13:15 ` Andy Shevchenko
2023-08-01 19:21 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Andrei Coardos @ 2023-07-25 12:36 UTC (permalink / raw)
To: linux-kernel, linux-gpio
Cc: andy, brgl, linus.walleij, Andrei Coardos, Alexandru Ardelean
This function call is not required because no counterpart
platform_get_drvdata() call is present to leverage the private data of
the driver.
Since the private data is confined to this driver file, external access
is not feasible.
The use of this function appears redundant in the current context of the
driver's implementation.
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
Changelog V1->V2:
* https://lore.kernel.org/linux-gpio/20230720132535.23413-1-aboutphysycs@gmail.com/
* fixed subject line: adjusted colons where needed
drivers/gpio/gpio-max77620.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpio-max77620.c
index c18b60e39a94..8c2a5609161f 100644
--- a/drivers/gpio/gpio-max77620.c
+++ b/drivers/gpio/gpio-max77620.c
@@ -331,8 +331,6 @@ static int max77620_gpio_probe(struct platform_device *pdev)
girq->init_hw = max77620_gpio_irq_init_hw;
girq->threaded = true;
- platform_set_drvdata(pdev, mgpio);
-
ret = devm_gpiochip_add_data(&pdev->dev, &mgpio->gpio_chip, mgpio);
if (ret < 0) {
dev_err(&pdev->dev, "gpio_init: Failed to add max77620_gpio\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] gpio: max77620: remove unneeded platform_set_drvdata() call
2023-07-25 12:36 [PATCH v2] gpio: max77620: remove unneeded platform_set_drvdata() call Andrei Coardos
@ 2023-07-25 13:15 ` Andy Shevchenko
2023-08-01 19:21 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-07-25 13:15 UTC (permalink / raw)
To: Andrei Coardos
Cc: linux-kernel, linux-gpio, brgl, linus.walleij, Alexandru Ardelean
On Tue, Jul 25, 2023 at 03:36:23PM +0300, Andrei Coardos wrote:
> This function call is not required because no counterpart
> platform_get_drvdata() call is present to leverage the private data of
> the driver.
> Since the private data is confined to this driver file, external access
> is not feasible.
> The use of this function appears redundant in the current context of the
> driver's implementation.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] gpio: max77620: remove unneeded platform_set_drvdata() call
2023-07-25 12:36 [PATCH v2] gpio: max77620: remove unneeded platform_set_drvdata() call Andrei Coardos
2023-07-25 13:15 ` Andy Shevchenko
@ 2023-08-01 19:21 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-08-01 19:21 UTC (permalink / raw)
To: Andrei Coardos
Cc: linux-kernel, linux-gpio, andy, linus.walleij, Alexandru Ardelean
On Tue, Jul 25, 2023 at 2:36 PM Andrei Coardos <aboutphysycs@gmail.com> wrote:
>
> This function call is not required because no counterpart
> platform_get_drvdata() call is present to leverage the private data of
> the driver.
> Since the private data is confined to this driver file, external access
> is not feasible.
> The use of this function appears redundant in the current context of the
> driver's implementation.
>
> Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
>
> Changelog V1->V2:
>
> * https://lore.kernel.org/linux-gpio/20230720132535.23413-1-aboutphysycs@gmail.com/
> * fixed subject line: adjusted colons where needed
>
> drivers/gpio/gpio-max77620.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpio-max77620.c
> index c18b60e39a94..8c2a5609161f 100644
> --- a/drivers/gpio/gpio-max77620.c
> +++ b/drivers/gpio/gpio-max77620.c
> @@ -331,8 +331,6 @@ static int max77620_gpio_probe(struct platform_device *pdev)
> girq->init_hw = max77620_gpio_irq_init_hw;
> girq->threaded = true;
>
> - platform_set_drvdata(pdev, mgpio);
> -
> ret = devm_gpiochip_add_data(&pdev->dev, &mgpio->gpio_chip, mgpio);
> if (ret < 0) {
> dev_err(&pdev->dev, "gpio_init: Failed to add max77620_gpio\n");
> --
> 2.34.1
>
Applied, thanks!
Bartosz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-01 19:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 12:36 [PATCH v2] gpio: max77620: remove unneeded platform_set_drvdata() call Andrei Coardos
2023-07-25 13:15 ` Andy Shevchenko
2023-08-01 19:21 ` Bartosz Golaszewski
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).