ALSA: pcm: oss: Use guard() for spin locks
Clean up the code using guard() for spin locks. Merely code refactoring, and no behavior change. Link: https://patch.msgid.link/20250827080618.7682-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>pull/476/head
parent
cdbd2acef2
commit
d2de0f8b5a
|
|
@ -2002,9 +2002,8 @@ static int snd_pcm_oss_set_fragment(struct snd_pcm_oss_file *pcm_oss_file, unsig
|
|||
|
||||
static int snd_pcm_oss_nonblock(struct file * file)
|
||||
{
|
||||
spin_lock(&file->f_lock);
|
||||
guard(spinlock)(&file->f_lock);
|
||||
file->f_flags |= O_NONBLOCK;
|
||||
spin_unlock(&file->f_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue