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

Tony Lindgren
2007-05-25T00:34:30Z

* 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.

Tony