summaryrefslogtreecommitdiffstats
path: root/include/linux/joystick.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2005-05-29 02:26:31 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 02:26:31 -0500
commit024ac44c701d43f5e2d34bd6a35b2813a36e6010 (patch)
tree2f0cefd615ce72353e75536ac1067f549e7b5715 /include/linux/joystick.h
parentf23488b2ab1b447ea4ea3d00cdb0d322a73e7f7f (diff)
downloadblackbird-op-linux-024ac44c701d43f5e2d34bd6a35b2813a36e6010.tar.gz
blackbird-op-linux-024ac44c701d43f5e2d34bd6a35b2813a36e6010.zip
Input: This patch implements compat_ioctl for joydev.
I've tested it with a Logitech WingMan Rumblepad on an x86-64 machine, and on an ia32 machine to make sure I didn't break anything. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/joystick.h')
-rw-r--r--include/linux/joystick.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/include/linux/joystick.h b/include/linux/joystick.h
index b7e0ab622cd7..06b9af77eb7f 100644
--- a/include/linux/joystick.h
+++ b/include/linux/joystick.h
@@ -111,18 +111,35 @@ struct js_corr {
#define JS_SET_ALL 8
struct JS_DATA_TYPE {
- int buttons;
- int x;
- int y;
+ __s32 buttons;
+ __s32 x;
+ __s32 y;
};
-struct JS_DATA_SAVE_TYPE {
- int JS_TIMEOUT;
- int BUSY;
- long JS_EXPIRETIME;
- long JS_TIMELIMIT;
+struct JS_DATA_SAVE_TYPE_32 {
+ __s32 JS_TIMEOUT;
+ __s32 BUSY;
+ __s32 JS_EXPIRETIME;
+ __s32 JS_TIMELIMIT;
struct JS_DATA_TYPE JS_SAVE;
struct JS_DATA_TYPE JS_CORR;
};
+struct JS_DATA_SAVE_TYPE_64 {
+ __s32 JS_TIMEOUT;
+ __s32 BUSY;
+ __s64 JS_EXPIRETIME;
+ __s64 JS_TIMELIMIT;
+ struct JS_DATA_TYPE JS_SAVE;
+ struct JS_DATA_TYPE JS_CORR;
+};
+
+#if BITS_PER_LONG == 64
+#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64
+#elif BITS_PER_LONG == 32
+#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_32
+#else
+#error Unexpected BITS_PER_LONG
+#endif
+
#endif /* _LINUX_JOYSTICK_H */
OpenPOWER on IntegriCloud