Skip to contentSkip to conversation

ASoC: Update cx20442 for TTY API change

PATCH In review Mark Brown 4 participants 4 messages May 11, 2011 – May 12, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Update cx20442 for TTY API change

receive_buf() was recently changed to return the number of bytes received but the cx20442 driver wasn't updated to match the new API. I don't have any hardware but since we don't actually appears to be listening to the data at all just report that we accepted all the data that was offered to us.

---
 sound/soc/codecs/cx20442.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/cx20442.c +5 -3
index d68ea53..f8c663d 100644
@@ -262,14 +262,14 @@ static int v253_hangup(struct tty_struct *tty)
 }
 
 /* Line discipline .receive_buf() */
-static void v253_receive(struct tty_struct *tty,
-				const unsigned char *cp, char *fp, int count)
+static unsigned int v253_receive(struct tty_struct *tty,
+				 const unsigned char *cp, char *fp, int count)
 {
 	struct snd_soc_codec *codec = tty->disc_data;
 	struct cx20442_priv *cx20442;
 
 	if (!codec)
-		return;
+		return count;
 
 	cx20442 = snd_soc_codec_get_drvdata(codec);
 
@@ -281,6 +281,8 @@ static void v253_receive(struct tty_struct *tty,
 		codec->hw_write = (hw_write_t)tty->ops->write;
 		codec->card->pop_time = 1;
 	}
+
+	return count;
 }
 
 /* Line discipline .write_wakeup() */
Signature · 1 line
1.7.5.1
#1 lore raw

Hi,

Quoted 7 lines · Mark Brown

receive_buf() was recently changed to return the number of bytes received but the cx20442 driver wasn't updated to match the new API. I don't have any hardware but since we don't actually appears to be listening to the data at all just report that we accepted all the data that was offered to us.

FWIW:

Looks good to me

Signature · 1 line
balbi
Acked-by on v1 1/1
#2 lore raw
In reply to Mark Brown
Quoted 34 lines · Mark Brown

receive_buf() was recently changed to return the number of bytes received but the cx20442 driver wasn't updated to match the new API. I don't have any hardware but since we don't actually appears to be listening to the data at all just report that we accepted all the data that was offered to us.

---
 sound/soc/codecs/cx20442.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/cx20442.c +3 -3
index d68ea53..f8c663d 100644
@@ -262,14 +262,14 @@ static int v253_hangup(struct tty_struct *tty)
 }
 
 /* Line discipline .receive_buf() */
-static void v253_receive(struct tty_struct *tty,
-				const unsigned char *cp, char *fp, int count)
+static unsigned int v253_receive(struct tty_struct *tty,
+				 const unsigned char *cp, char *fp, int count)
 {
 	struct snd_soc_codec *codec = tty->disc_data;
 	struct cx20442_priv *cx20442;
 
 	if (!codec)
-		return;
+		return count;
 
 	cx20442 = snd_soc_codec_get_drvdata(codec);
 

sound/soc/codecs/cx20442.c static void v253_receive(struct tty_struct *tty, · line 288

Quoted 8 lines
sound/soc/codecs/cx20442.c +2 -0
@@ -281,6 +281,8 @@ static void v253_receive(struct tty_struct *tty,
 		codec->hw_write = (hw_write_t)tty->ops->write;
 		codec->card->pop_time = 1;
 	}
+
+	return count;
 }
 
 /* Line discipline .write_wakeup() */
Acked-by on v1 1/1
#3 lore raw
In reply to Mark Brown
Quoted 7 lines · On Wed 11 May 2011 at 09:40:43 Mark Brown wrote:

receive_buf() was recently changed to return the number of bytes received but the cx20442 driver wasn't updated to match the new API. I don't have any hardware but since we don't actually appears to be listening to the data at all just report that we accepted all the data that was offered to us.

Quoted 35 lines
---
 sound/soc/codecs/cx20442.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/cx20442.c +5 -3
index d68ea53..f8c663d 100644
@@ -262,14 +262,14 @@ static int v253_hangup(struct tty_struct *tty)
 }
 
 /* Line discipline .receive_buf() */
-static void v253_receive(struct tty_struct *tty,
-				const unsigned char *cp, char *fp, int count)
+static unsigned int v253_receive(struct tty_struct *tty,
+				 const unsigned char *cp, char *fp, int count)
 {
 	struct snd_soc_codec *codec = tty->disc_data;
 	struct cx20442_priv *cx20442;
 
 	if (!codec)
-		return;
+		return count;
 
 	cx20442 = snd_soc_codec_get_drvdata(codec);
 
@@ -281,6 +281,8 @@ static void v253_receive(struct tty_struct *tty,
 		codec->hw_write = (hw_write_t)tty->ops->write;
 		codec->card->pop_time = 1;
 	}
+
+	return count;
 }
 
 /* Line discipline .write_wakeup() */