public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Update cx20442 for TTY API change
@ 2011-05-11 14:05 Mark Brown
  2011-05-11 15:55 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-05-11 14:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Felipe Balbi, linux-kernel, Liam Girdwood, 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.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
---

This is a bug fix on top of "tty: make receive_buf() return the amout of
bytes received"

 sound/soc/codecs/cx20442.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index d68ea53..f8c663d 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -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() */
-- 
1.7.5.1


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

* Re: [PATCH] ASoC: Update cx20442 for TTY API change
  2011-05-11 14:05 [PATCH] ASoC: Update cx20442 for TTY API change Mark Brown
@ 2011-05-11 15:55 ` Greg KH
  2011-05-11 16:11   ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2011-05-11 15:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: Felipe Balbi, linux-kernel, Liam Girdwood

On Wed, May 11, 2011 at 04:05:44PM +0200, 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.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Acked-by: Liam Girdwood <lrg@ti.com>
> ---
> 
> This is a bug fix on top of "tty: make receive_buf() return the amout of
> bytes received"
> 
>  sound/soc/codecs/cx20442.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)

Do you want me to take this through the tty tree, or do you want to take
it through the SOC sound tree?  If you want to do it, that's fine with
me, whatever is easier for you.

thanks,

greg k-h

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

* Re: [PATCH] ASoC: Update cx20442 for TTY API change
  2011-05-11 15:55 ` Greg KH
@ 2011-05-11 16:11   ` Mark Brown
  2011-05-11 16:27     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-05-11 16:11 UTC (permalink / raw)
  To: Greg KH; +Cc: Felipe Balbi, linux-kernel, Liam Girdwood

On Wed, May 11, 2011 at 08:55:35AM -0700, Greg KH wrote:

> Do you want me to take this through the tty tree, or do you want to take
> it through the SOC sound tree?  If you want to do it, that's fine with
> me, whatever is easier for you.

Please apply it to your tree - the problem that this fixes was
introduced by a patch in your tree in -next so it'd introduce breakage
in my tree if I'd applied it anyway.

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

* Re: [PATCH] ASoC: Update cx20442 for TTY API change
  2011-05-11 16:11   ` Mark Brown
@ 2011-05-11 16:27     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2011-05-11 16:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: Felipe Balbi, linux-kernel, Liam Girdwood

On Wed, May 11, 2011 at 06:11:31PM +0200, Mark Brown wrote:
> On Wed, May 11, 2011 at 08:55:35AM -0700, Greg KH wrote:
> 
> > Do you want me to take this through the tty tree, or do you want to take
> > it through the SOC sound tree?  If you want to do it, that's fine with
> > me, whatever is easier for you.
> 
> Please apply it to your tree - the problem that this fixes was
> introduced by a patch in your tree in -next so it'd introduce breakage
> in my tree if I'd applied it anyway.

Doh, you are right, sorry, I'll go queue it up.

greg k-h

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

end of thread, other threads:[~2011-05-11 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 14:05 [PATCH] ASoC: Update cx20442 for TTY API change Mark Brown
2011-05-11 15:55 ` Greg KH
2011-05-11 16:11   ` Mark Brown
2011-05-11 16:27     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox