aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-04-23 19:56:22 -0400
committerLinus Walleij <linus.walleij@linaro.org>2015-05-06 09:23:03 -0400
commitcac089f9026e9ddb3481daf08f0fc4e5949fa1af (patch)
tree3a184f29293e9af11263714a78717c81ae33babe /include/linux/platform_data
parent606f13e9efa0892561e7c471242e4ad0bcaf6ecb (diff)
gpio: omap: Allow building as a loadable module
We currently get all kinds of errors building the omap gpio driver as a module starting with: undefined reference to `omap2_gpio_resume_after_idle' undefined reference to `omap2_gpio_prepare_for_idle' ... Let's fix the issue by adding inline functions to the header. Note that we can now also remove the two unused functions for omap_set_gpio_debounce and omap_set_gpio_debounce_time. Then doing rmmod on the module produces further warnings because of missing exit related functions. Let's add those. And finally, we can make the Kconfig entry just a tristate option that's selected for omaps. Cc: Javier Martinez Canillas <javier@dowhile0.org> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@linaro.org> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/gpio-omap.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/platform_data/gpio-omap.h b/include/linux/platform_data/gpio-omap.h
index 5d50b25a73d7..cb2618147c34 100644
--- a/include/linux/platform_data/gpio-omap.h
+++ b/include/linux/platform_data/gpio-omap.h
@@ -208,9 +208,17 @@ struct omap_gpio_platform_data {
208 int (*get_context_loss_count)(struct device *dev); 208 int (*get_context_loss_count)(struct device *dev);
209}; 209};
210 210
211#if IS_BUILTIN(CONFIG_GPIO_OMAP)
211extern void omap2_gpio_prepare_for_idle(int off_mode); 212extern void omap2_gpio_prepare_for_idle(int off_mode);
212extern void omap2_gpio_resume_after_idle(void); 213extern void omap2_gpio_resume_after_idle(void);
213extern void omap_set_gpio_debounce(int gpio, int enable); 214#else
214extern void omap_set_gpio_debounce_time(int gpio, int enable); 215static inline void omap2_gpio_prepare_for_idle(int off_mode)
216{
217}
218
219static inline void omap2_gpio_resume_after_idle(void)
220{
221}
222#endif
215 223
216#endif 224#endif