summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-06-14 19:07:06 +0900
committerLinus Walleij <linus.walleij@linaro.org>2016-06-23 11:07:11 +0200
commit762c2e46c0591d207289105c8718e4adf29b2b34 (patch)
treed2633889cb875cb3261e68e4be98982ec69a7b8c /drivers/bus
parent1020dfd15b2363bf652851c490a27a550070346e (diff)
downloadtalos-obmc-linux-762c2e46c0591d207289105c8718e4adf29b2b34.tar.gz
talos-obmc-linux-762c2e46c0591d207289105c8718e4adf29b2b34.zip
gpio: of: remove of_gpiochip_and_xlate() and struct gg_data
The usage of gpiochip_find(&gg_data, of_gpiochip_and_xlate) is odd. Usually gpiochip_find() is used to find a gpio_chip. Here, however, the return value from gpiochip_find() is just discarded. Instead, gpiochip_find(&gg_data, of_gpiochip_and_xlate) is called for the side-effect of the match function. The match function, of_gpiochip_find_and_xlate(), fills the given struct gg_data, but a match function should be simply called to judge the matching. This commit fixes this distortion and makes the code more readable. Remove of_gpiochip_find_and_xlate() and struct gg_data. Instead, this adds a very simple helper function of_find_gpiochip_by_node(). Now, of_get_named_gpiod_flags() is implemented more straight-forward. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/bus')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud