This is needed by ./net/bluetooth/rfcomm/tty.c
Signed-off-by: Hauke Mehrtens <[email protected]>
---
backport/backport-include/linux/tty.h | 4 ++++
backport/compat/backport-3.10.c | 19 +++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/backport/backport-include/linux/tty.h
b/backport/backport-include/linux/tty.h
index b102645..7b57ca1 100644
--- a/backport/backport-include/linux/tty.h
+++ b/backport/backport-include/linux/tty.h
@@ -48,4 +48,8 @@ extern int n_tty_ioctl_helper(struct tty_struct *tty, struct
file *file,
tty_register_device(driver, index, device)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+extern void tty_port_tty_wakeup(struct tty_port *port);
+#endif
+
#endif /* __BACKPORT_LINUX_TTY_H */
diff --git a/backport/compat/backport-3.10.c b/backport/compat/backport-3.10.c
index 5273758..d8b3bc6 100644
--- a/backport/compat/backport-3.10.c
+++ b/backport/compat/backport-3.10.c
@@ -13,6 +13,7 @@
#include <linux/err.h>
#include <linux/proc_fs.h>
#include <linux/random.h>
+#include <linux/tty.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
#include <linux/init.h>
@@ -90,3 +91,21 @@ unsigned int get_random_int(void)
return r;
}
EXPORT_SYMBOL_GPL(get_random_int);
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+/**
+ * tty_port_tty_wakeup - helper to wake up a tty
+ *
+ * @port: tty port
+ */
+void tty_port_tty_wakeup(struct tty_port *port)
+{
+ struct tty_struct *tty = tty_port_tty_get(port);
+
+ if (tty) {
+ tty_wakeup(tty);
+ tty_kref_put(tty);
+ }
+}
+EXPORT_SYMBOL_GPL(tty_port_tty_wakeup);
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) */
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html