]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: fix "gpio-line-names" property retrieval
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 15 Dec 2017 14:02:33 +0000 (15:02 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 22 Dec 2017 14:24:31 +0000 (15:24 +0100)
commitecb7c9cb8f930d45a6a1b6b4dbc36252e6930976
treeef88e533e8cfbfd57b68434d614aea02bbe11807
parentaf77c55d2f1ff1252752b1ff99f0b5eb01f17b34
gpio: fix "gpio-line-names" property retrieval

Following commit 85d32132556a5 ("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: 85d32132556a5 ("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>
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib-devprop.c
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.h