aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-02-14 03:24:58 -0500
committerTakashi Iwai <tiwai@suse.de>2012-02-14 03:24:58 -0500
commit675c67afb6a05907d9683ef176f41852bb1b5b9d (patch)
tree3b10821811da038702364d1940bdac5b51261d17
parenta68f20ef80e62b3dfed3097ad57ec88550cdabe7 (diff)
parent1987877d869027ab63dc9df515e11f19279a8091 (diff)
Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
A simple fix from Morimoto-san for the pointer() operation in the FSI driver.
-rw-r--r--sound/soc/sh/fsi.c6
1 files changed, 1 insertions, 5 deletions
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)
1152{ 1152{
1153 struct fsi_priv *fsi = fsi_get_priv(substream); 1153 struct fsi_priv *fsi = fsi_get_priv(substream);
1154 struct fsi_stream *io = fsi_get_stream(fsi, fsi_is_play(substream)); 1154 struct fsi_stream *io = fsi_get_stream(fsi, fsi_is_play(substream));
1155 int samples_pos = io->buff_sample_pos - 1;
1156 1155
1157 if (samples_pos < 0) 1156 return fsi_sample2frame(fsi, io->buff_sample_pos);
1158 samples_pos = 0;
1159
1160 return fsi_sample2frame(fsi, samples_pos);
1161} 1157}
1162 1158
1163static struct snd_pcm_ops fsi_pcm_ops = { 1159static struct snd_pcm_ops fsi_pcm_ops = {