ALSA: usx2y: Replace runtime->status->state reference to runtime->state
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> Link: https://lore.kernel.org/r/20220926135558.26580-9-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
d8b4efeeb3
commit
ca4833c5a2
|
@ -822,8 +822,7 @@ static int snd_usx2y_pcm_hw_free(struct snd_pcm_substream *substream)
|
|||
usx2y_urbs_release(subs);
|
||||
if (!cap_subs->pcm_substream ||
|
||||
!cap_subs->pcm_substream->runtime ||
|
||||
!cap_subs->pcm_substream->runtime->status ||
|
||||
cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) {
|
||||
cap_subs->pcm_substream->runtime->state < SNDRV_PCM_STATE_PREPARED) {
|
||||
atomic_set(&cap_subs->state, STATE_STOPPED);
|
||||
usx2y_urbs_release(cap_subs);
|
||||
}
|
||||
|
|
|
@ -374,8 +374,7 @@ static int snd_usx2y_usbpcm_hw_free(struct snd_pcm_substream *substream)
|
|||
usx2y_usbpcm_urbs_release(subs);
|
||||
if (!cap_subs->pcm_substream ||
|
||||
!cap_subs->pcm_substream->runtime ||
|
||||
!cap_subs->pcm_substream->runtime->status ||
|
||||
cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) {
|
||||
cap_subs->pcm_substream->runtime->state < SNDRV_PCM_STATE_PREPARED) {
|
||||
atomic_set(&cap_subs->state, STATE_STOPPED);
|
||||
if (cap_subs2)
|
||||
atomic_set(&cap_subs2->state, STATE_STOPPED);
|
||||
|
|
Loading…
Reference in New Issue