# HG changeset patch # User Florian Pose # Date 1476778821 -7200 # Node ID 8e6fad4f9a74adebb14b4a5faffc0dbc8c9ef268 # Parent 973060629fc69f845bd7f16e8077141ddbdb73f9 Support changed tty_prepare_flip_string() interface from kernel 3.9. diff -r 973060629fc6 -r 8e6fad4f9a74 tty/module.c --- a/tty/module.c Wed Jun 22 14:08:34 2016 +0200 +++ b/tty/module.c Tue Oct 18 10:20:21 2016 +0200 @@ -337,7 +337,11 @@ 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 @@ 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 } }