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 */
#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>
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)) */