struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long period_size, buffer_size;
- mutex_lock(&chip->mtx);
+ guard(mutex)(&chip->mtx);
period_size = snd_pcm_lib_period_bytes(substream);
buffer_size = snd_pcm_lib_buffer_bytes(substream);
snd_pcm_period_elapsed,
(void *)substream);
- mutex_unlock(&chip->mtx);
-
return 0;
}
struct snd_pcm_runtime *runtime = substream->runtime;
unsigned long period_size, buffer_size;
- mutex_lock(&chip->mtx);
+ guard(mutex)(&chip->mtx);
period_size = snd_pcm_lib_period_bytes(substream);
buffer_size = snd_pcm_lib_buffer_bytes(substream);
snd_pcm_period_elapsed,
(void *)substream);
- mutex_unlock(&chip->mtx);
-
return 0;
}