From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH] ARM: OMAP: Fix building with CONFIG_OMAP_GPIO_SWITCH off. Date: Tue, 5 Jun 2007 03:34:58 -0700 Message-ID: <20070605103458.GH859@atomide.com> References: <20070525003430.GE19506@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: andrzej zaborowski Cc: Linux OMAP ML List-Id: linux-omap@vger.kernel.org * andrzej zaborowski [070527 05:57]: > On 25/05/07, Tony Lindgren wrote: >> * andrzej zaborowski [070522 10:26]: >> > Define omap_register_gpio_switches when CONFIG_OMAP_GPIO_SWITCH is >> > off. This will prevent adding a CONFIG_OMAP_GPIO_SWITCH check in the >> > board files and enable building board-palmte.c with gpio-switch off. >> > Also add __initdata to the two variables in gpio-switch that are used >> only >> > during init. >> > >> > Signed-off-by: Andrzej Zaborowski >> >> > @@ -48,7 +49,12 @@ struct omap_gpio_switch { >> > }; >> > >> > /* Call at init time only */ >> > -extern void omap_register_gpio_switches(const struct omap_gpio_switch >> *tbl, >> > - int count); >> > +#ifdef CONFIG_OMAP_GPIO_SWITCH >> > +extern void omap_register_gpio_switches( >> > + const struct omap_gpio_switch *tbl, int count); >> > +#else >> > +static inline void omap_register_gpio_switches( >> > + const struct omap_gpio_switch *tbl, int count) {} >> > +#endif >> > >> > #endif >> > -- >> > 1.4.4.3 >> > >> >> Can you please put the extern functions into a header file? >> We got some comments on that on LKML few weeks ago. > > Sorry, not sure which functions/header you mean? We are not supposed to have prototypes for extern functions in .c files, they should be in .h files. Tony