gpio: loongson1 :remove unneeded platform_set_drvdata()call
Subsystems (3)
PATCH 1/1 gpio: loongson1 :remove unneeded platform_set_drvdata()call
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.
--- drivers/gpio/gpio-loongson1.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpio/gpio-loongson1.c +0 -2
@@ -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);
Signature · 1 line
2.34.1
Keguang Zhang
maintainerQuoted 7 lines · Andrei Coardos
In the
drivers/gpio/gpio-loongson1the call toplatform_set_drvdatawas 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.
If there is a ls1x_gpio_remove(), platform_get_drvdata() will be called. Then platform_set_drvdata() will be necessary.
Quoted 23 lines
Reviewed-by Alexandru Ardelean <[email protected]>Signed-off-by Andrei Coardos <[email protected]>--- drivers/gpio/gpio-loongson1.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpio/gpio-loongson1.c +0
-3@@ -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); --2.34.1
Signature · 3 lines
Best regards, Keguang Zhang
Andy Shevchenko
Reviewed-byQuoted 6 lines · Keguang Zhang
Quoted 4 lines · Andrei Coardos
In the
drivers/gpio/gpio-loongson1the call toplatform_set_drvdatawas removed.
This function call was found to be unnecesarry as the associated
unnecessary
Quoted 6 lines
Quoted 3 lines
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.If there is a
ls1x_gpio_remove(),platform_get_drvdata()will be called. Thenplatform_set_drvdata()will be necessary.
I don't get this. Is it just a side note? To me the patch looks legit.
...
With typo fixed,
Signature · 2 lines
With Best Regards, Andy Shevchenko