ASoC: sh: Replace runtime->status->state reference to runtime->state
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Sep 2022 13:55:57 +0000 (15:55 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 27 Sep 2022 06:49:25 +0000 (08:49 +0200)
The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object.  Replace the calls accordingly.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220926135558.26580-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/sh/rz-ssi.c

index 7ace0c0db5b154b457415ece608296cb0e63f094..5d6bae33ae34ca64ce079a771c2624ae7274a14b 100644 (file)
@@ -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