Re: [PATCH] ARM: OMAP: Fix building with CONFIG_OMAP_GPIO_SWITCH off.

Tony Lindgren
2007-06-05T10:34:58Z

* andrzej zaborowski <balrogg@gmail.com> [070527 05:57]:
> On 25/05/07, Tony Lindgren <tony@atomide.com> wrote:
>> * andrzej zaborowski <balrogg@gmail.com> [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 <balrog@zabor.org>
>>
>> > @@ -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