linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] snd: soc: cx20442 codec: set tty->receiver_room in v253_open
@ 2016-06-16 20:04 Janusz Krzysztofik
  2016-06-17 11:40 ` Mark Brown
  2016-06-17 11:43 ` Applied "ASoC: cx20442: set tty->receiver_room in v253_open" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Janusz Krzysztofik @ 2016-06-16 20:04 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel,
	Janusz Krzysztofik

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>
---
 sound/soc/codecs/cx20442.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index d6f4abb..fb3885f 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -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;
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-17 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 20:04 [PATCH] snd: soc: cx20442 codec: set tty->receiver_room in v253_open Janusz Krzysztofik
2016-06-17 11:40 ` Mark Brown
2016-06-17 11:43 ` Applied "ASoC: cx20442: set tty->receiver_room in v253_open" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).