From: Andrei Coardos <aboutphysycs@gmail.com>
To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Cc: andy@kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org,
Andrei Coardos <aboutphysycs@gmail.com>,
Alexandru Ardelean <alex@shruggie.ro>
Subject: [PATCH] gpio : max77620: remove unneeded platform_set_drvdata() call
Date: Thu, 20 Jul 2023 16:25:35 +0300 [thread overview]
Message-ID: <20230720132535.23413-1-aboutphysycs@gmail.com> (raw)
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>
---
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
next reply other threads:[~2023-07-20 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 13:25 Andrei Coardos [this message]
2023-07-20 16:06 ` [PATCH] gpio : max77620: remove unneeded platform_set_drvdata() call Andy Shevchenko
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=20230720132535.23413-1-aboutphysycs@gmail.com \
--to=aboutphysycs@gmail.com \
--cc=alex@shruggie.ro \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).