diff options
Diffstat (limited to 'arch/mips/include/asm/ioctl.h')
-rw-r--r-- | arch/mips/include/asm/ioctl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/include/asm/ioctl.h b/arch/mips/include/asm/ioctl.h index 85067e248a83..916163401b2c 100644 --- a/arch/mips/include/asm/ioctl.h +++ b/arch/mips/include/asm/ioctl.h | |||
@@ -60,12 +60,16 @@ | |||
60 | ((nr) << _IOC_NRSHIFT) | \ | 60 | ((nr) << _IOC_NRSHIFT) | \ |
61 | ((size) << _IOC_SIZESHIFT)) | 61 | ((size) << _IOC_SIZESHIFT)) |
62 | 62 | ||
63 | #ifdef __KERNEL__ | ||
63 | /* provoke compile error for invalid uses of size argument */ | 64 | /* provoke compile error for invalid uses of size argument */ |
64 | extern unsigned int __invalid_size_argument_for_IOC; | 65 | extern unsigned int __invalid_size_argument_for_IOC; |
65 | #define _IOC_TYPECHECK(t) \ | 66 | #define _IOC_TYPECHECK(t) \ |
66 | ((sizeof(t) == sizeof(t[1]) && \ | 67 | ((sizeof(t) == sizeof(t[1]) && \ |
67 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ | 68 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ |
68 | sizeof(t) : __invalid_size_argument_for_IOC) | 69 | sizeof(t) : __invalid_size_argument_for_IOC) |
70 | #else | ||
71 | #define _IOC_TYPECHECK(t) (sizeof(t)) | ||
72 | #endif | ||
69 | 73 | ||
70 | /* used to create numbers */ | 74 | /* used to create numbers */ |
71 | #define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0) | 75 | #define _IO(type, nr) _IOC(_IOC_NONE, (type), (nr), 0) |