diff mbox series

gpio: loongson1 :remove unneeded platform_set_drvdata()call

Message ID 20230719101339.18256-1-aboutphysycs@gmail.com
State New
Headers show
Series gpio: loongson1 :remove unneeded platform_set_drvdata()call | expand

Commit Message

Andrei Coardos July 19, 2023, 10:13 a.m. UTC
In the drivers/gpio/gpio-loongson1 the call to platform_set_drvdata was
removed.
This function call was found to be unnecesarry as the associated
structure is defined inside the local .c file.
It doesn't use any type of function either so it can be removed without
any complications.

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
 drivers/gpio/gpio-loongson1.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-loongson1.c b/drivers/gpio/gpio-loongson1.c
index 6ca3b969db4d..2a57ffa0548b 100644
--- a/drivers/gpio/gpio-loongson1.c
+++ b/drivers/gpio/gpio-loongson1.c
@@ -78,8 +78,6 @@  static int ls1x_gpio_probe(struct platform_device *pdev)
 	if (ret)
 		goto err;
 
-	platform_set_drvdata(pdev, ls1x_gc);
-
 	dev_info(dev, "GPIO controller registered with %d pins\n",
 		 ls1x_gc->gc.ngpio);