]> 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)
commitc29970f3d141a92f149ba5e51511ae6040c10b6d
tree5846b9332fb38171a22be90fbfbcf31255080427
parent1bca1bb873a5fdbda2e91b9296f89b2efad2e578
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