From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Fri, 10 Jun 2011 23:04:06 +0200 Subject: [PATCH v4 3/4] drivers/amba: create devices from device tree In-Reply-To: <1307738923-7564-4-git-send-email-robherring2@gmail.com> References: <1307738923-7564-1-git-send-email-robherring2@gmail.com> <1307738923-7564-4-git-send-email-robherring2@gmail.com> Message-ID: <201106102304.06279.arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Friday 10 June 2011 22:48:42 Rob Herring wrote: > > +#ifdef CONFIG_OF > +int of_amba_device_create(struct device_node *node, struct device *parent); > +#endif > + > +#else > + > +#ifdef CONFIG_OF > +static inline int of_amba_device_create(struct device_node *node, > + struct device *parent) > +{ > + return 0; > +} > +#endif > + We normally don't use #ifdef around declarations like this, it doesn't hurt to have them even when the code is not there. Otherwise the patch looks good. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v4 3/4] drivers/amba: create devices from device tree Date: Fri, 10 Jun 2011 23:04:06 +0200 Message-ID: <201106102304.06279.arnd@arndb.de> References: <1307738923-7564-1-git-send-email-robherring2@gmail.com> <1307738923-7564-4-git-send-email-robherring2@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1307738923-7564-4-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Rob Herring Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , Jeremy Kerr , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Friday 10 June 2011 22:48:42 Rob Herring wrote: > > +#ifdef CONFIG_OF > +int of_amba_device_create(struct device_node *node, struct device *parent); > +#endif > + > +#else > + > +#ifdef CONFIG_OF > +static inline int of_amba_device_create(struct device_node *node, > + struct device *parent) > +{ > + return 0; > +} > +#endif > + We normally don't use #ifdef around declarations like this, it doesn't hurt to have them even when the code is not there. Otherwise the patch looks good. Arnd