diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-09-26 15:55:58 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-09-27 08:49:52 +0200 |
commit | 675b7cd16e21ce2452d4a11ed425996c34e5460c (patch) | |
tree | e81d3335e0d9dfe57d9ef45a4590796312def7c6 /drivers/usb | |
parent | a267fdd0a6ce3edd6419b10ee7bcde61aa15eb43 (diff) | |
download | linux-rpi-675b7cd16e21ce2452d4a11ed425996c34e5460c.tar.gz linux-rpi-675b7cd16e21ce2452d4a11ed425996c34e5460c.tar.bz2 linux-rpi-675b7cd16e21ce2452d4a11ed425996c34e5460c.zip |
usb: gadget: 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>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220926135558.26580-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/function/u_uac1_legacy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/u_uac1_legacy.c b/drivers/usb/gadget/function/u_uac1_legacy.c index 60ae8b2d3f6a..dd21c251542c 100644 --- a/drivers/usb/gadget/function/u_uac1_legacy.c +++ b/drivers/usb/gadget/function/u_uac1_legacy.c @@ -158,8 +158,8 @@ size_t u_audio_playback(struct gaudio *card, void *buf, size_t count) snd_pcm_sframes_t frames; try_again: - if (runtime->status->state == SNDRV_PCM_STATE_XRUN || - runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) { + if (runtime->state == SNDRV_PCM_STATE_XRUN || + runtime->state == SNDRV_PCM_STATE_SUSPENDED) { result = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_PREPARE, NULL); if (result < 0) { |