From: Grant Likely Date: Tue, 12 Feb 2013 17:48:37 +0000 (+0000) Subject: gpio: Make of_count_named_gpios() use new of_count_phandle_with_args() X-Git-Tag: v3.9-rc1~147^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80beb27d2f81a1c3c8887e0e0a82d77bb392d28;p=pandora-kernel.git gpio: Make of_count_named_gpios() use new of_count_phandle_with_args() This patch replaces the horribly coded of_count_named_gpios() with a call to of_count_phandle_with_args() which is far more efficient. This also changes the return value of of_gpio_count() & of_gpio_named_count() from 'unsigned int' to 'int' so that it can return an error code. All the users of that function are fixed up to correctly handle a negative return value. v2: Split GPIO portion into a separate patch Tested-by: Andreas Larsson Signed-off-by: Grant Likely Cc: Linus Walleij Cc: Rob Herring --- Reading git-diff-tree failed