]> git.baikalelectronics.ru Git - kernel.git/commitdiff
leds: lgm-sso: Get rid of duplicate of_node assignment
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 14 Dec 2021 14:27:39 +0000 (16:27 +0200)
committerPavel Machek <pavel@ucw.cz>
Wed, 12 Jan 2022 18:43:15 +0000 (19:43 +0100)
GPIO library does copy the of_node from the parent device of
the GPIO chip, there is no need to repeat this in the individual
drivers. Remove assignment here.

For the details one may look into the of_gpio_dev_init() implementation.

Call graph:
   --> sso_gpio_gc_init()
     --> devm_gpiochip_add_data
       --> devm_gpiochip_add_data_with_key
         --> gpiochip_add_data_with_key()
           --> of_gpio_dev_init()

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/blink/leds-lgm-sso.c

index fd8b7573285adc84dd325ac3d2e357cd150e70d6..6f270c0272fb1b49a0705404dc795a97549dfda5 100644 (file)
@@ -477,7 +477,6 @@ static int sso_gpio_gc_init(struct device *dev, struct sso_led_priv *priv)
        gc->ngpio               = priv->gpio.pins;
        gc->parent              = dev;
        gc->owner               = THIS_MODULE;
-       gc->of_node             = dev->of_node;
 
        return devm_gpiochip_add_data(dev, gc, priv);
 }