From 2acdb1694494eb6f17b44b2b3065879af32d0d46 Mon Sep 17 00:00:00 2001 From: Paul Fulghum Date: Thu, 10 May 2007 22:22:43 -0700 Subject: synclink_gt: add compat_ioctl Add support for 32 bit ioctl on 64 bit systems for synclink_gt Cc: Arnd Bergmann Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/synclink.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/linux/synclink.h') diff --git a/include/linux/synclink.h b/include/linux/synclink.h index c8b042667af1..5562fbf72095 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h @@ -291,4 +291,28 @@ struct gpio_desc { #define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc) #define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc) +#ifdef __KERNEL__ +/* provide 32 bit ioctl compatibility on 64 bit systems */ +#ifdef CONFIG_COMPAT +#include +struct MGSL_PARAMS32 { + compat_ulong_t mode; + unsigned char loopback; + unsigned short flags; + unsigned char encoding; + compat_ulong_t clock_speed; + unsigned char addr_filter; + unsigned short crc_type; + unsigned char preamble_length; + unsigned char preamble; + compat_ulong_t data_rate; + unsigned char data_bits; + unsigned char stop_bits; + unsigned char parity; +}; +#define MGSL_IOCSPARAMS32 _IOW(MGSL_MAGIC_IOC,0,struct MGSL_PARAMS32) +#define MGSL_IOCGPARAMS32 _IOR(MGSL_MAGIC_IOC,1,struct MGSL_PARAMS32) +#endif +#endif + #endif /* _SYNCLINK_H_ */ -- cgit v1.2.2