linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: viperboard: remove platform_set_drvdata() call in probe
@ 2021-07-07 13:51 Alexandru Ardelean
  2021-07-21 13:16 ` Bartosz Golaszewski
  2021-08-25  7:01 ` [PATCH v2] " Alexandru Ardelean
  0 siblings, 2 replies; 6+ messages in thread
From: Alexandru Ardelean @ 2021-07-07 13:51 UTC (permalink / raw)
  To: linux-gpio, linux-kernel; +Cc: bgolaszewski, linus.walleij, Alexandru Ardelean

The platform_set_drvdata() call is only useful if we need to retrieve back
the private information.
Since the driver doesn't do that, it's not useful to have it.

This change removes it.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
---
 drivers/gpio/gpio-viperboard.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c
index c301c1d56dd2..98ddd6590362 100644
--- a/drivers/gpio/gpio-viperboard.c
+++ b/drivers/gpio/gpio-viperboard.c
@@ -422,12 +422,8 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
 	vb_gpio->gpiob.direction_input = vprbrd_gpiob_direction_input;
 	vb_gpio->gpiob.direction_output = vprbrd_gpiob_direction_output;
 	ret = devm_gpiochip_add_data(&pdev->dev, &vb_gpio->gpiob, vb_gpio);
-	if (ret < 0) {
+	if (ret < 0)
 		dev_err(vb_gpio->gpiob.parent, "could not add gpio b");
-		return ret;
-	}
-
-	platform_set_drvdata(pdev, vb_gpio);
 
 	return ret;
 }
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-31  9:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 13:51 [PATCH] gpio: viperboard: remove platform_set_drvdata() call in probe Alexandru Ardelean
2021-07-21 13:16 ` Bartosz Golaszewski
2021-07-21 14:13   ` Alexandru Ardelean
2021-07-27 13:32     ` Bartosz Golaszewski
2021-08-25  7:01 ` [PATCH v2] " Alexandru Ardelean
2021-08-31  9:29   ` 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).