History

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.

Tony Lindgren committed 11 years ago

Commit cac089f1 parent 606f13e3 files · +35 −3Browse files

Showing the changes to include/linux/platform_data (1 of 3 files). Show all

Unified · Split

include/linux/platform_data/gpio-omap.h+10−2
@@ -208,9 +208,17 @@ struct omap_gpio_platform_data { · 207 unmodified lines
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#endif224#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t