]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: add tty_set_termios only for kernel >= 2.6.27
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Feb 2011 13:49:44 +0000 (14:49 +0100)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 28 Feb 2011 05:49:09 +0000 (21:49 -0800)
tty_set_termios does not build with older kernel versions and is only
needed by bluetooth which works only for kernel >= 2.6.27.

Reported-by: Juan Carlos Garza <juancarlosgarza@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/compat-2.6.39.c
include/linux/compat-2.6.39.h

index c2966f7147247a28c68640567cd55a66746930fb..8d858776d291b32d5371f2031237ac68a613794a 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/compat.h>
 #include <linux/tty.h>
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
 /*
  *             Termios Helper Methods
  */
@@ -108,4 +109,5 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
        return 0;
 }
 EXPORT_SYMBOL_GPL(tty_set_termios);
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */
 
index 1c7b322c9b5027f184989cc65dffb3eee106ee12..0c4f03050ad0f1192ed05ece7967d418e2d351e6 100644 (file)
@@ -27,7 +27,9 @@
 #define tiocmget(tty) tiocmget(tty, NULL)
 #define tiocmset(tty, set, clear) tiocmset(tty, NULL, set, clear)
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
 extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */