Skip to content

Commit

Permalink
leds: lgm-sso: Get rid of duplicate of_node assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Pavel Machek committed Jan 12, 2022
1 parent 27d1a62 commit 2702c9b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/leds/blink/leds-lgm-sso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2702c9b

Please sign in to comment.