From: Grant Likely Date: Sun, 10 Feb 2013 22:57:21 +0000 (+0000) Subject: of: Create function for counting number of phandles in a property X-Git-Tag: v3.9-rc1~147^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd69f73f2c81eed9a398708b8c4bb3409ba1b0f9;p=pandora-kernel.git of: Create function for counting number of phandles in a property This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing method of parsing each phandle individually until parsing fails which is a horribly slow way to do the count. Tested on ARM using the selftest code. v3: - Rebased on top of selftest code cleanup patch v2: - fix bug where of_parse_phandle_with_args() could behave like _count_. - made of_gpio_named_count() into a static inline regardless of CONFIG_OF_GPIO Tested-by: Andreas Larsson Signed-off-by: Grant Likely Cc: Linus Walleij Cc: Rob Herring --- Reading git-diff-tree failed