x86: convert trivial headers to asm-generic version
[pandora-kernel.git] / arch / x86 / include / asm / ioctls.h
index 0d5b23b..a799e20 100644 (file)
@@ -1,12 +1,23 @@
-#ifndef _ASM_X86_IOCTLS_H
-#define _ASM_X86_IOCTLS_H
+#ifndef __ASM_GENERIC_IOCTLS_H
+#define __ASM_GENERIC_IOCTLS_H
 
-#include <asm/ioctl.h>
+#include <linux/ioctl.h>
+
+/*
+ * These are the most common definitions for tty ioctl numbers.
+ * Most of them do not use the recommended _IOC(), but there is
+ * probably some source code out there hardcoding the number,
+ * so we might as well use them for all new platforms.
+ *
+ * The architectures that use different values here typically
+ * try to be compatible with some Unix variants for the same
+ * architecture.
+ */
 
 /* 0x54 is just a magic number to make these relatively unique ('T') */
 
 #define TCGETS         0x5401
-#define TCSETS         0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
+#define TCSETS         0x5402
 #define TCSETSW                0x5403
 #define TCSETSF                0x5404
 #define TCGETA         0x5405
@@ -43,7 +54,6 @@
 #define TIOCSETD       0x5423
 #define TIOCGETD       0x5424
 #define TCSBRKP                0x5425  /* Needed for POSIX tcsendbreak() */
-/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */
 #define TIOCSBRK       0x5427  /* BSD compatibility */
 #define TIOCCBRK       0x5428  /* BSD compatibility */
 #define TIOCGSID       0x5429  /* Return the session ID of FD */
@@ -53,8 +63,7 @@
 #define TCSETSF2       _IOW('T', 0x2D, struct termios2)
 #define TIOCGRS485     0x542E
 #define TIOCSRS485     0x542F
-#define TIOCGPTN       _IOR('T', 0x30, unsigned int)
-                               /* Get Pty Number (of pty-mux device) */
+#define TIOCGPTN       _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T', 0x31, int)  /* Lock/unlock Pty */
 #define TCGETX         0x5432 /* SYS5 TCGETX compatibility */
 #define TCSETX         0x5433
 
 #define TIOCMIWAIT     0x545C  /* wait for a change on serial input line(s) */
 #define TIOCGICOUNT    0x545D  /* read serial port inline interrupt counts */
-#define TIOCGHAYESESP   0x545E  /* Get Hayes ESP configuration */
-#define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
-#define FIOQSIZE       0x5460
+
+/*
+ * some architectures define FIOQSIZE as 0x545E, which is used for
+ * TIOCGHAYESESP on others
+ */
+#ifndef FIOQSIZE
+# define TIOCGHAYESESP 0x545E  /* Get Hayes ESP configuration */
+# define TIOCSHAYESESP 0x545F  /* Set Hayes ESP configuration */
+# define FIOQSIZE      0x5460
+#endif
 
 /* Used for packet mode */
 #define TIOCPKT_DATA            0
 #define TIOCPKT_NOSTOP         16
 #define TIOCPKT_DOSTOP         32
 
-#define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+#define TIOCSER_TEMT   0x01    /* Transmitter physically empty */
 
-#endif /* _ASM_X86_IOCTLS_H */
+#endif /* __ASM_GENERIC_IOCTLS_H */