gpio: logicvc: remove unneeded platform_set_drvdata() call
PATCH 1/1 gpio: logicvc: remove unneeded platform_set_drvdata() call
The platform_set_drvdata() isn't needed for anything. The function is a simple setter that doesn't change anything in the code. That is because there isn't a get function and since it has no dependencies it can be removed.
--- drivers/gpio/gpio-logicvc.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpio/gpio-logicvc.c +0 -2
@@ -139,8 +139,6 @@ static int logicvc_gpio_probe(struct platform_device *pdev) logicvc->chip.set = logicvc_gpio_set; logicvc->chip.direction_output = logicvc_gpio_direction_output; -platform_set_drvdata (pdev, logicvc); -return devm_gpiochip_add_data (dev, &logicvc->chip, logicvc); }
Signature · 1 line
2.34.1
Quoted 4 lines · Andrei Coardos
The
platform_set_drvdata()isn't needed for anything. The function is a simple setter that doesn't change anything in the code. That is because there isn't a get function and since it has no dependencies it can be removed.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Bartosz Golaszewski
AppliedQuoted 26 lines · Andrei Coardos
The
platform_set_drvdata()isn't needed for anything. The function is a simple setter that doesn't change anything in the code. That is because there isn't a get function and since it has no dependencies it can be removed.Reviewed-by Alexandru Ardelean <[email protected]>Signed-off-by Andrei Coardos <[email protected]>--- drivers/gpio/gpio-logicvc.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpio/gpio-logicvc.c +0
-3@@ -139,8 +139,6 @@ static int logicvc_gpio_probe(struct platform_device *pdev) logicvc->chip.set = logicvc_gpio_set; logicvc->chip.direction_output = logicvc_gpio_direction_output; -platform_set_drvdata (pdev, logicvc); -return devm_gpiochip_add_data (dev, &logicvc->chip, logicvc); } --
Quoted 2 lines
2.34.1
Applied, thanks!
Bart