From b6cace3df1f501c89dbc91daa90008b40f04938c Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Tue, 18 Oct 2016 10:20:21 +0200 Subject: [PATCH] Support changed tty_prepare_flip_string() interface from kernel 3.9. --- tty/module.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tty/module.c b/tty/module.c index f512c6b3..48058a9d 100644 --- a/tty/module.c +++ b/tty/module.c @@ -337,7 +337,11 @@ void ec_tty_wakeup(unsigned long data) to_recv = ec_tty_rx_size(tty); if (to_recv && tty->tty) { unsigned char *cbuf; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + int space = tty_prepare_flip_string(tty->tty->port, &cbuf, to_recv); +#else int space = tty_prepare_flip_string(tty->tty, &cbuf, to_recv); +#endif if (space < to_recv) { printk(KERN_WARNING PFX "Insufficient space to_recv=%d space=%d\n", @@ -362,7 +366,11 @@ void ec_tty_wakeup(unsigned long data) tty->rx_read_idx = (tty->rx_read_idx + 1) % EC_TTY_RX_BUFFER_SIZE; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) + tty_flip_buffer_push(tty->tty->port); +#else tty_flip_buffer_push(tty->tty); +#endif } }