summaryrefslogtreecommitdiff
path: root/sound/soc/renesas/rz-ssi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/renesas/rz-ssi.c')
-rw-r--r--sound/soc/renesas/rz-ssi.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c
index 0f7458a43901..e00940814157 100644
--- a/sound/soc/renesas/rz-ssi.c
+++ b/sound/soc/renesas/rz-ssi.c
@@ -188,24 +188,18 @@ static void rz_ssi_set_substream(struct rz_ssi_stream *strm,
struct snd_pcm_substream *substream)
{
struct rz_ssi_priv *ssi = strm->priv;
- unsigned long flags;
- spin_lock_irqsave(&ssi->lock, flags);
+ guard(spinlock_irqsave)(&ssi->lock);
+
strm->substream = substream;
- spin_unlock_irqrestore(&ssi->lock, flags);
}
static bool rz_ssi_stream_is_valid(struct rz_ssi_priv *ssi,
struct rz_ssi_stream *strm)
{
- unsigned long flags;
- bool ret;
-
- spin_lock_irqsave(&ssi->lock, flags);
- ret = strm->substream && strm->substream->runtime;
- spin_unlock_irqrestore(&ssi->lock, flags);
+ guard(spinlock_irqsave)(&ssi->lock);
- return ret;
+ return strm->substream && strm->substream->runtime;
}
static inline bool rz_ssi_is_stream_running(struct rz_ssi_stream *strm)