mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
ASoC: renesas: rz-ssi: Use guard() for spin locks
Clean up the code using guard() for spin locks. Merely code refactoring, and no behavior change. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Message-ID: <87frcx1yp5.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
15583c4dbb
commit
7d08366612
|
|
@ -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;
|
||||
guard(spinlock_irqsave)(&ssi->lock);
|
||||
|
||||
spin_lock_irqsave(&ssi->lock, flags);
|
||||
ret = strm->substream && strm->substream->runtime;
|
||||
spin_unlock_irqrestore(&ssi->lock, flags);
|
||||
|
||||
return ret;
|
||||
return strm->substream && strm->substream->runtime;
|
||||
}
|
||||
|
||||
static inline bool rz_ssi_is_stream_running(struct rz_ssi_stream *strm)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user