Masahiro Yamada 762c2e46c0 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>
2016-06-23 11:07:11 +02:00
..
2016-05-27 15:26:11 -07:00
2016-05-31 11:52:59 -07:00
2016-05-24 11:00:20 -07:00
2016-05-26 19:34:26 -07:00
2016-05-27 15:26:11 -07:00
2016-05-19 11:27:09 -07:00
2016-06-03 22:34:18 +02:00
2016-05-27 15:26:11 -07:00
2016-05-31 22:17:05 +05:30
2016-05-20 21:26:15 -07:00
2016-05-28 17:37:42 +02:00
2016-05-27 15:26:11 -07:00
2016-05-25 10:40:15 -07:00
2016-05-24 11:00:20 -07:00
2016-05-18 16:38:59 -07:00
2016-05-27 15:26:11 -07:00
2016-05-26 19:34:26 -07:00
2016-05-27 15:26:11 -07:00
2016-05-24 11:00:20 -07:00
2016-05-20 21:20:31 -07:00
2016-05-20 21:12:25 -07:00
2016-05-20 21:26:15 -07:00
2016-05-29 22:32:27 -07:00
2016-05-25 10:40:15 -07:00
2016-05-26 19:34:26 -07:00
2016-05-20 18:33:37 -07:00
2016-05-29 13:28:39 -07:00
2016-05-28 12:23:12 -07:00
2016-05-31 21:25:52 -06:00
2016-05-10 01:19:26 -07:00
2016-05-31 08:20:43 +03:00
2016-05-23 11:18:01 -07:00