diff mbox series

[10/11] ASoC: sh: Replace runtime->status->state reference to runtime->state

Message ID 20220926135558.26580-11-tiwai@suse.de (mailing list archive)
State Accepted
Commit a267fdd0a6ce3edd6419b10ee7bcde61aa15eb43
Headers show
Series ALSA: PCM state reference optimization | expand

Commit Message

Takashi Iwai Sept. 26, 2022, 1:55 p.m. UTC
The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object.  Replace the calls accordingly.

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---

I'm going to merge this through my sound git tree as it requires ALSA
core changes.

 sound/soc/sh/rz-ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Sept. 26, 2022, 6:01 p.m. UTC | #1
On Mon, Sep 26, 2022 at 03:55:57PM +0200, Takashi Iwai wrote:
> The recent change in ALSA core allows drivers to get the current PCM
> state directly from runtime object.  Replace the calls accordingly.

Acked-by: Mark Brown <broonie@kernel.org>
diff mbox series

Patch

diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c
index 7ace0c0db5b1..5d6bae33ae34 100644
--- a/sound/soc/sh/rz-ssi.c
+++ b/sound/soc/sh/rz-ssi.c
@@ -598,7 +598,7 @@  static int rz_ssi_dma_transfer(struct rz_ssi_priv *ssi,
 		return -EINVAL;
 
 	runtime = substream->runtime;
-	if (runtime->status->state == SNDRV_PCM_STATE_DRAINING)
+	if (runtime->state == SNDRV_PCM_STATE_DRAINING)
 		/*
 		 * Stream is ending, so do not queue up any more DMA
 		 * transfers otherwise we play partial sound clips