From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by ozlabs.org (Postfix) with ESMTP id B2827DE272 for ; Tue, 6 Jan 2009 19:14:30 +1100 (EST) From: Stefan Roese To: avorontsov@ru.mvista.com Subject: Re: [spi-devel-general] [PATCH v5] spi: Add PPC4xx SPI driver Date: Tue, 6 Jan 2009 09:14:19 +0100 References: <1227628088-10849-1-git-send-email-sr@denx.de> <20090106020603.GA14074@oksana.dev.rtsoft.ru> In-Reply-To: <20090106020603.GA14074@oksana.dev.rtsoft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <200901060914.19435.sr@denx.de> Cc: david-b@pacbell.net, linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Anton, On Tuesday 06 January 2009, Anton Vorontsov wrote: > > This adds a SPI driver for the SPI controller found in the IBM/AMCC > > 4xx PowerPC's. > > > > Signed-off-by: Stefan Roese > > Signed-off-by: Wolfgang Ocker > > Acked-by: Josh Boyer > > --- > > [...] > > > +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. Thanks for the hint. I'll use it in the next version. Best regards, Stefan