mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
synclink_gt: add compat_ioctl
Add support for 32 bit ioctl on 64 bit systems for synclink_gt Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4c64c30a5c
commit
2acdb16944
3 changed files with 132 additions and 1 deletions
|
|
@ -140,7 +140,6 @@ header-y += snmp.h
|
|||
header-y += sockios.h
|
||||
header-y += som.h
|
||||
header-y += sound.h
|
||||
header-y += synclink.h
|
||||
header-y += taskstats.h
|
||||
header-y += telephony.h
|
||||
header-y += termios.h
|
||||
|
|
@ -320,6 +319,7 @@ unifdef-y += sonypi.h
|
|||
unifdef-y += soundcard.h
|
||||
unifdef-y += stat.h
|
||||
unifdef-y += stddef.h
|
||||
unifdef-y += synclink.h
|
||||
unifdef-y += sysctl.h
|
||||
unifdef-y += tcp.h
|
||||
unifdef-y += time.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 <linux/compat.h>
|
||||
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_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue