Hi Stefan,

On Tue, Nov 25, 2008 at 04:48:08PM +0100, Stefan Roese wrote:
> This adds a SPI driver for the SPI controller found in the IBM/AMCC
> 4xx PowerPC's.
> 
> Signed-off-by: Stefan Roese <s...@denx.de>
> Signed-off-by: Wolfgang Ocker <w...@reccoware.de>
> Acked-by: Josh Boyer <jwbo...@linux.vnet.ibm.com>
> ---
[...]
> +static unsigned int of_num_gpios(struct device_node *node)
> +{
> +     unsigned int num = 0;
> +
> +     while (gpio_is_valid(of_get_gpio(node, num)))
> +             num++;
> +     return num;
> +}

FYI, as of commit 749820928a2fd47ff536773d869d2c3f8038b7d1 ("of/gpio:
Implement of_gpio_count()") you can use of_gpio_count() from
linux/of_gpio.h.

-- 
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to