]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: OF: separation of concerns
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 3 Oct 2016 08:09:40 +0000 (10:09 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 3 Oct 2016 13:27:05 +0000 (15:27 +0200)
commit3d3cb61009f9b5a538e1593befcd0cf418e20195
tree5846b9332fb38171a22be90fbfbcf31255080427
parentf15f82059c9298b5dd9ac7f04319aa3f4193b2fe
gpio: OF: separation of concerns

The generic GPIO library directly implement code for of_find_gpio()
which is only used with CONFIG_OF and causes compilation problems
on archs that do not even have stubs for OF functions, especially
on UM that does not implement any IO remap functions.

Move the function to gpiolib-of.c, implement a static inline stub
in gpiolib.h returning PTR_ERR(-ENOENT) if CONFIG_OF_GPIO is not
set and be done with it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h