ASoC: cx20442: set tty->receiver_room in v253_open
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Thu, 16 Jun 2016 20:04:35 +0000 (22:04 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 17 Jun 2016 11:39:52 +0000 (12:39 +0100)
Commit 79901317ce80 ("n_tty: Don't flush buffer when closing ldisc"),
introduced in v3.10, revealed a bug in the cx20442 codec driver
which has never been setting tty->receive_room on line discipline
open as it should from the beginning. Fix it.

Created and tested on Amstrad Delta against Linux-4.7-rc3

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cx20442.c

index d6f4abbbf8a7fd669237d667a03825c13c3603ed..fb3885fe0afb75a872a8d08f7d6fb931555e2446 100644 (file)
@@ -226,6 +226,7 @@ static int v253_open(struct tty_struct *tty)
        if (!tty->disc_data)
                return -ENODEV;
 
+       tty->receive_room = 16;
        if (tty->ops->write(tty, v253_init, len) != len) {
                ret = -EIO;
                goto err;