gpio: fix "gpio-line-names" property retrieval
Following commit9427ecbed4
("gpio: Rework of_gpiochip_set_names() to use device property accessors"), "gpio-line-names" DT property is not retrieved anymore when chip->parent is not set by the driver. This is due to OF based property reads having been replaced by device based property reads. This patch fixes that by making use of fwnode_property_read_string_array() instead of device_property_read_string_array() and handing over either of_fwnode_handle(chip->of_node) or dev_fwnode(chip->parent) to that function. Fixes:9427ecbed4
("gpio: Rework of_gpiochip_set_names() to use device property accessors") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:

committed by
Linus Walleij

parent
8bb65fc06c
commit
8227033547
@@ -493,7 +493,8 @@ int of_gpiochip_add(struct gpio_chip *chip)
|
||||
|
||||
/* If the chip defines names itself, these take precedence */
|
||||
if (!chip->names)
|
||||
devprop_gpiochip_set_names(chip);
|
||||
devprop_gpiochip_set_names(chip,
|
||||
of_fwnode_handle(chip->of_node));
|
||||
|
||||
of_node_get(chip->of_node);
|
||||
|
||||
|
Reference in New Issue
Block a user