gpiolib: Move of_node operations to gpiolib-of and correct fwnode use
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 9 Mar 2021 09:37:33 +0000 (11:37 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 26 Mar 2021 13:56:18 +0000 (14:56 +0100)
commit1df62542e0161e828615d7ec233e68c18902b0dc
tree5fe7952f0bd4933efbc7ffcd27a3305965d78196
parent944f4b0af9ca0d203ebc0d1426218af372d2d995
gpiolib: Move of_node operations to gpiolib-of and correct fwnode use

The initial value of the OF node based on presence of parent, but
at the same time this operation somehow appeared separately from others
that handle the OF case. On the other hand there is no need to assign
dev->fwnode in the OF case if code properly retrieves fwnode, i.e.
via dev_fwnode() helper.

Amend gpiolib.c and gpiolib-of.c code in order to group OF operations.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c