diff options
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r-- | sound/usb/usbaudio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 3f7930c0b616..8d4a085f642a 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -815,8 +815,14 @@ static int wait_clear_urbs(snd_usb_substream_t *subs) | |||
815 | */ | 815 | */ |
816 | static snd_pcm_uframes_t snd_usb_pcm_pointer(snd_pcm_substream_t *substream) | 816 | static snd_pcm_uframes_t snd_usb_pcm_pointer(snd_pcm_substream_t *substream) |
817 | { | 817 | { |
818 | snd_usb_substream_t *subs = (snd_usb_substream_t *)substream->runtime->private_data; | 818 | snd_usb_substream_t *subs; |
819 | return subs->hwptr_done; | 819 | snd_pcm_uframes_t hwptr_done; |
820 | |||
821 | subs = (snd_usb_substream_t *)substream->runtime->private_data; | ||
822 | spin_lock(&subs->lock); | ||
823 | hwptr_done = subs->hwptr_done; | ||
824 | spin_unlock(&subs->lock); | ||
825 | return hwptr_done; | ||
820 | } | 826 | } |
821 | 827 | ||
822 | 828 | ||