]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
of: of_parse_phandles_with_args() learns to differentiate 'hole' cells
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Fri, 5 Dec 2008 08:15:46 +0000 (08:15 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 21 Dec 2008 03:21:14 +0000 (14:21 +1100)
commit7736a3db98bed028d0e5235f8958a730acfd822e
tree27ab46e431b71294c24dbbf721bdbc581f977f14
parentc1bb7c6d04ebdf48998649100c5267a9139debf5
of: of_parse_phandles_with_args() learns to differentiate 'hole' cells

Given this list (contains three gpio specifiers, one of which is a hole):

gpios = <&phandle1 1 2 3
         0 /* a hole */
         &phandle2 4 5 6>;

of_parse_phandles_with_args() would report -ENOENT for the `hole'
specifier item, the same error value is used to report the end of the
list, for example.

Sometimes we want to differentiate holes from real errors -- for
example when we want to count all the [syntax correct] specifiers.

With this patch of_parse_phandles_with_args() will report -EEXITS when
somebody requested to parse a hole.

Also, make the out_{node,args} arguments optional, when counting we
don't really need the out values.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/of/base.c