aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-02-03 03:57:40 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-03 06:55:40 -0500
commit97df81873e9c1391319dd818bc4b6856517e4939 (patch)
tree8bace972292ae123e27ce1785ce8f14ab824d96a /sound/soc/sh/fsi.c
parent180346ede352b12c72c5aeba2fc806fd32880c16 (diff)
ASoC: fsi: fsi_stream_is_working() care substream->runtime
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r--sound/soc/sh/fsi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 8d05e59c8831..1e10184af89a 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -450,7 +450,7 @@ static int fsi_stream_is_working(struct fsi_priv *fsi,
450 int ret; 450 int ret;
451 451
452 spin_lock_irqsave(&master->lock, flags); 452 spin_lock_irqsave(&master->lock, flags);
453 ret = !!io->substream; 453 ret = !!(io->substream && io->substream->runtime);
454 spin_unlock_irqrestore(&master->lock, flags); 454 spin_unlock_irqrestore(&master->lock, flags);
455 455
456 return ret; 456 return ret;
@@ -756,9 +756,7 @@ static int fsi_pio_transfer(struct fsi_priv *fsi, struct fsi_stream *io,
756 u8 *buf; 756 u8 *buf;
757 int over_period; 757 int over_period;
758 758
759 if (!fsi || 759 if (!fsi_stream_is_working(fsi, io))
760 !io->substream ||
761 !io->substream->runtime)
762 return -EINVAL; 760 return -EINVAL;
763 761
764 over_period = 0; 762 over_period = 0;