diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-29 10:40:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-29 10:40:13 -0700 |
commit | 45b30105e7231b70bb855923dbca443ee3ba44c3 (patch) | |
tree | 3628af0d6e4be079c9638edb17e20dab74d19cea /include | |
parent | 6cf2b3fc9934a56ceeb393ea5d0149e0bebc80fa (diff) | |
parent | 7d6064d44bc79e328f2794ee7322ba2676511e2b (diff) | |
download | op-kernel-dev-45b30105e7231b70bb855923dbca443ee3ba44c3.zip op-kernel-dev-45b30105e7231b70bb855923dbca443ee3ba44c3.tar.gz |
Automatic merge of 'for-linus' branch from
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gameport.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index b1272f82..cd623ec 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h @@ -67,6 +67,8 @@ int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mo void gameport_close(struct gameport *gameport); void gameport_rescan(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) { @@ -75,6 +77,29 @@ static inline void gameport_register_port(struct gameport *gameport) void gameport_unregister_port(struct gameport *gameport); +void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) + __attribute__ ((format (printf, 2, 3))); + +#else + +static inline void gameport_register_port(struct gameport *gameport) +{ + return; +} + +static inline void gameport_unregister_port(struct gameport *gameport) +{ + return; +} + +static inline void gameport_set_phys(struct gameport *gameport, + const char *fmt, ...) +{ + return; +} + +#endif + static inline struct gameport *gameport_allocate_port(void) { struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); @@ -92,9 +117,6 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name strlcpy(gameport->name, name, sizeof(gameport->name)); } -void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))); - /* * Use the following fucntions to manipulate gameport's per-port * driver-specific data. |