From: Kuninori Morimoto Date: Thu, 9 Feb 2012 00:57:29 +0000 (-0800) Subject: ASoC: fsi: fixup fsi_pointer() calculation method X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1987877d869027ab63dc9df515e11f19279a8091;p=linux-beck.git ASoC: fsi: fixup fsi_pointer() calculation method current fsi_pointer() calculation was not correct for FSI driver. This patch fix it up. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index db6c89a28bda..ea4a82d01160 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1152,12 +1152,8 @@ static snd_pcm_uframes_t fsi_pointer(struct snd_pcm_substream *substream) { struct fsi_priv *fsi = fsi_get_priv(substream); struct fsi_stream *io = fsi_get_stream(fsi, fsi_is_play(substream)); - int samples_pos = io->buff_sample_pos - 1; - if (samples_pos < 0) - samples_pos = 0; - - return fsi_sample2frame(fsi, samples_pos); + return fsi_sample2frame(fsi, io->buff_sample_pos); } static struct snd_pcm_ops fsi_pcm_ops = {