gpio: logicvc: remove unneeded platform_set_drvdata() call
authorAndrei Coardos <aboutphysycs@gmail.com>
Wed, 19 Jul 2023 09:48:03 +0000 (12:48 +0300)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 29 Jul 2023 14:05:50 +0000 (16:05 +0200)
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 <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-logicvc.c

index 2b9876b..05d6201 100644 (file)
@@ -138,8 +138,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);
 }