diff options
author | Jaeden Amero <jaeden.amero@ni.com> | 2012-09-24 11:39:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-25 18:40:56 -0400 |
commit | 142e5460a66edbfe881474eb422e86ff61c4bfc7 (patch) | |
tree | a69a7a35c997afd19d1eb932094449619f431839 /fs/compat_ioctl.c | |
parent | ac57e7f38ea6fe7358cd0b7a2f2d21aef5ab70cd (diff) |
compat_ioctl: Avoid using undefined RS-485 IOCTLs
Wrap the use of TIOCSRS485 and TIOCGRS485 in #ifdef so that we avoid
adding undefined IOCTLs to the ioctl pointer list as compatible
ioctls.
This change was motivated by a build error on a MIPS build.
tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
tty-next
head: ac57e7f38ea6fe7358cd0b7a2f2d21aef5ab70cd
commit: 84c3b84860440a9e3a3666c14112f41311b8f623 [10/16] compat_ioctl:
Add RS-485 IOCTLs to the list
config: mips-fuloong2e_defconfig
All related error/warning messages:
fs/compat_ioctl.c:869:1: error: 'TIOCSRS485' undeclared here (not in a
function)
fs/compat_ioctl.c:870:1: error: 'TIOCGRS485' undeclared here (not in a
function)
vim +869 fs/compat_ioctl.c
863 COMPATIBLE_IOCTL(TIOCSPGRP)
864 COMPATIBLE_IOCTL(TIOCGPGRP)
865 COMPATIBLE_IOCTL(TIOCGPTN)
866 COMPATIBLE_IOCTL(TIOCSPTLCK)
867 COMPATIBLE_IOCTL(TIOCSERGETLSR)
868 COMPATIBLE_IOCTL(TIOCSIG)
> 869 COMPATIBLE_IOCTL(TIOCSRS485)
870 COMPATIBLE_IOCTL(TIOCGRS485)
871 #ifdef TCGETS2
872 COMPATIBLE_IOCTL(TCGETS2)
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/compat_ioctl.c')
-rw-r--r-- | fs/compat_ioctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 85dfebfe6820..59f8db4a39a7 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -866,8 +866,12 @@ COMPATIBLE_IOCTL(TIOCGPTN) | |||
866 | COMPATIBLE_IOCTL(TIOCSPTLCK) | 866 | COMPATIBLE_IOCTL(TIOCSPTLCK) |
867 | COMPATIBLE_IOCTL(TIOCSERGETLSR) | 867 | COMPATIBLE_IOCTL(TIOCSERGETLSR) |
868 | COMPATIBLE_IOCTL(TIOCSIG) | 868 | COMPATIBLE_IOCTL(TIOCSIG) |
869 | #ifdef TIOCSRS485 | ||
869 | COMPATIBLE_IOCTL(TIOCSRS485) | 870 | COMPATIBLE_IOCTL(TIOCSRS485) |
871 | #endif | ||
872 | #ifdef TIOCGRS485 | ||
870 | COMPATIBLE_IOCTL(TIOCGRS485) | 873 | COMPATIBLE_IOCTL(TIOCGRS485) |
874 | #endif | ||
871 | #ifdef TCGETS2 | 875 | #ifdef TCGETS2 |
872 | COMPATIBLE_IOCTL(TCGETS2) | 876 | COMPATIBLE_IOCTL(TCGETS2) |
873 | COMPATIBLE_IOCTL(TCSETS2) | 877 | COMPATIBLE_IOCTL(TCSETS2) |