]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
leds: tca6507: Get rid of duplicate of_node assignment
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 14 Dec 2021 14:27:38 +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:
   --> 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>
drivers/leds/leds-tca6507.c

index de8eed9b667d1bc0cfec9644b3089ef321f70f9f..1473ced8664c67dd40cd9f2e0a851abb5b221eb2 100644 (file)
@@ -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;