Skip to content

Commit

Permalink
ASoC: Update cx20442 for TTY API change
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mark Brown authored and Greg Kroah-Hartman committed May 11, 2011
1 parent 177c2cb commit ed0bd23
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sound/soc/codecs/cx20442.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,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);

Expand All @@ -293,6 +293,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() */
Expand Down

0 comments on commit ed0bd23

Please sign in to comment.