Re: [PATCH 1/2] OF: new helper: of_parse_phandles_with_args()

2008-10-09 Thread Benjamin Herrenschmidt
> + for (i = 0; i < list_cells; cur_index++) { > + const u32 *cells; > + const phandle *phandle; > + > + phandle = list + i; > + args = phandle + 1; Rather than incrementing i, I would just use a running pointer "list" and drop "i" totally. Not

[PATCH 1/2] OF: new helper: of_parse_phandles_with_args()

2008-10-06 Thread Anton Vorontsov
The helper is factored out of of_get_gpio(). Will be used by the QE pin multiplexing functions (they need to parse the gpios = <> too). Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- drivers/of/base.c | 111 drivers/of/gpio.c | 77

[PATCH 1/2] OF: new helper: of_parse_phandles_with_args()

2008-09-25 Thread Anton Vorontsov
Factored out of of_get_gpio(). Will be used by the QE pin multiplexing functions (they need to parse the gpios = <> too). Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- drivers/of/base.c | 111 drivers/of/gpio.c | 77 +++---