From 41c34d188a598b016d62e152735f8466fe9910a4 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 26 May 2013 15:49:08 +0000 Subject: fix ioctl _IOR, _IOW, etc macros to avoid signed overflow (2<<30) --- arch/mips/bits/ioctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/mips/bits') diff --git a/arch/mips/bits/ioctl.h b/arch/mips/bits/ioctl.h index 5040226c..83fb1678 100644 --- a/arch/mips/bits/ioctl.h +++ b/arch/mips/bits/ioctl.h @@ -3,10 +3,10 @@ #define _IOC_READ 2U #define _IOC_WRITE 4U -#define _IO(a,b) _IOC(1U,(a),(b),0) -#define _IOW(a,b,c) _IOC(4U,(a),(b),sizeof(c)) -#define _IOR(a,b,c) _IOC(2U,(a),(b),sizeof(c)) -#define _IOWR(a,b,c) _IOC(6U,(a),(b),sizeof(c)) +#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) +#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) +#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) +#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) #define TCGETA 0x5401 #define TCSETA 0x5402 -- cgit v1.2.3-70-g09d2