diff options
author | Anton Vorontsov <cbouatmailru@gmail.com> | 2012-01-04 05:09:35 (GMT) |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2012-01-04 05:09:35 (GMT) |
commit | 251f39fe42dae863bd24e30864e6b66076ba076d (patch) | |
tree | c804944bc17f3836d19cc8b5bc611dd1fb0ea915 /include/linux/gameport.h | |
parent | 9b8872273af6983b246252a6508fa7cf34c69d6e (diff) | |
parent | 35b4c01e29bdd9632dabf9784ed3486333f00427 (diff) | |
download | linux-fsl-qoriq-251f39fe42dae863bd24e30864e6b66076ba076d.tar.xz |
Merge branch 'power-supply-scope' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Diffstat (limited to 'include/linux/gameport.h')
-rw-r--r-- | include/linux/gameport.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index b65a6f4..b456b08 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h @@ -71,15 +71,14 @@ void gameport_close(struct gameport *gameport); #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) void __gameport_register_port(struct gameport *gameport, struct module *owner); -static inline void gameport_register_port(struct gameport *gameport) -{ - __gameport_register_port(gameport, THIS_MODULE); -} +/* use a define to avoid include chaining to get THIS_MODULE */ +#define gameport_register_port(gameport) \ + __gameport_register_port(gameport, THIS_MODULE) void gameport_unregister_port(struct gameport *gameport); -void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))); +__printf(2, 3) +void gameport_set_phys(struct gameport *gameport, const char *fmt, ...); #else @@ -93,8 +92,8 @@ static inline void gameport_unregister_port(struct gameport *gameport) return; } -static inline void gameport_set_phys(struct gameport *gameport, - const char *fmt, ...) +static inline __printf(2, 3) +void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) { return; } @@ -145,12 +144,12 @@ static inline void gameport_unpin_driver(struct gameport *gameport) mutex_unlock(&gameport->drv_mutex); } -int __gameport_register_driver(struct gameport_driver *drv, +int __must_check __gameport_register_driver(struct gameport_driver *drv, struct module *owner, const char *mod_name); -static inline int __must_check gameport_register_driver(struct gameport_driver *drv) -{ - return __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); -} + +/* use a define to avoid include chaining to get THIS_MODULE & friends */ +#define gameport_register_driver(drv) \ + __gameport_register_driver(drv, THIS_MODULE, KBUILD_MODNAME) void gameport_unregister_driver(struct gameport_driver *drv); |