提交 97df8187 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: fsi: fsi_stream_is_working() care substream->runtime

Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 180346ed
......@@ -450,7 +450,7 @@ static int fsi_stream_is_working(struct fsi_priv *fsi,
int ret;
spin_lock_irqsave(&master->lock, flags);
ret = !!io->substream;
ret = !!(io->substream && io->substream->runtime);
spin_unlock_irqrestore(&master->lock, flags);
return ret;
......@@ -756,9 +756,7 @@ static int fsi_pio_transfer(struct fsi_priv *fsi, struct fsi_stream *io,
u8 *buf;
int over_period;
if (!fsi ||
!io->substream ||
!io->substream->runtime)
if (!fsi_stream_is_working(fsi, io))
return -EINVAL;
over_period = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册