diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-09-09 10:54:25 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-09-14 10:54:01 +0200 |
commit | 7cba1a4d5e1628e099728d849918de50dab2e24e (patch) | |
tree | 294a4a2e9b35eaa8a1c047924918f9d0e061880f /drivers/gpio/gpiolib-of.c | |
parent | 6b6ff4acb310a0351005474673f1e09a90020efd (diff) | |
download | linux-7cba1a4d5e1628e099728d849918de50dab2e24e.tar.bz2 |
gpiolib: generalize devprop_gpiochip_set_names() for device properties
devprop_gpiochip_set_names() is overly complicated with taking the
fwnode argument (which requires using dev_fwnode() & of_fwnode_handle()
in ACPI and OF GPIO code respectively). Let's just switch to using the
generic device properties.
This allows us to pull the code setting line names directly into
gpiochip_add_data_with_key() instead of handling it separately for
ACPI and OF.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index bd31dd3b6a75..2f895a2b8411 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -1026,11 +1026,6 @@ int of_gpiochip_add(struct gpio_chip *chip) if (ret) return ret; - /* If the chip defines names itself, these take precedence */ - if (!chip->names) - devprop_gpiochip_set_names(chip, - of_fwnode_handle(chip->of_node)); - of_node_get(chip->of_node); ret = of_gpiochip_scan_gpios(chip); |