summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/ioctl.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-13 13:56:44 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-13 13:56:44 +0200
commit73909f7a665991013dcff42a815fda76d3a7300a (patch)
tree84bb9899e2204bf6af6fd4f249bb909c2a89faf8 /include/asm-generic/ioctl.h
parentd6672c501852d577097f6757c311d937aca0b04b (diff)
parent30a2f3c60a84092c8084dfe788b710f8d0768cd4 (diff)
Merge commit 'v2.6.27-rc3' into core/urgent
Diffstat (limited to 'include/asm-generic/ioctl.h')
-rw-r--r--include/asm-generic/ioctl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index 86418138557..15828b2d663 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -68,12 +68,16 @@
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
+#ifdef __KERNEL__
/* provoke compile error for invalid uses of size argument */
extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
+#else
+#define _IOC_TYPECHECK(t) (sizeof(t))
+#endif
/* used to create numbers */
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)