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
Takashi Iwai 2025-08-27 10:06:13 +02:00
parent cdbd2acef2
commit d2de0f8b5a
1 changed files with 1 additions and 2 deletions

View File

@ -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) static int snd_pcm_oss_nonblock(struct file * file)
{ {
spin_lock(&file->f_lock); guard(spinlock)(&file->f_lock);
file->f_flags |= O_NONBLOCK; file->f_flags |= O_NONBLOCK;
spin_unlock(&file->f_lock);
return 0; return 0;
} }