Skip to content

Commit

Permalink
leds: tca6507: 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:
   --> tca6507_probe_gpios()
     --> gpiochip_add_data()
       --> 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 b7f1ac9 commit 27d1a62
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/leds/leds-tca6507.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,6 @@ static int tca6507_probe_gpios(struct device *dev,
tca->gpio.direction_output = tca6507_gpio_direction_output;
tca->gpio.set = tca6507_gpio_set_value;
tca->gpio.parent = dev;
#ifdef CONFIG_OF_GPIO
tca->gpio.of_node = of_node_get(dev_of_node(dev));
#endif
err = gpiochip_add_data(&tca->gpio, tca);
if (err) {
tca->gpio.ngpio = 0;
Expand Down

0 comments on commit 27d1a62

Please sign in to comment.