]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - sound/oss/sh_dac_audio.c
Use f_lock to protect f_flags
[net-next-2.6.git] / sound / oss / sh_dac_audio.c
index b493660deb36b503b39a509861ebf54b2eb8254b..78cfb66e4c59cecf83c51d55b8b7f7baf9bf683b 100644 (file)
@@ -26,7 +26,7 @@
 #include <asm/cpu/dac.h>
 #include <asm/cpu/timer.h>
 #include <asm/machvec.h>
-#include <asm/hp6xx.h>
+#include <mach/hp6xx.h>
 #include <asm/hd64461.h>
 
 #define MODNAME "sh_dac_audio"
@@ -135,7 +135,9 @@ static int dac_audio_ioctl(struct inode *inode, struct file *file,
                return put_user(AFMT_U8, (int *)arg);
 
        case SNDCTL_DSP_NONBLOCK:
+               spin_lock(&file->f_lock);
                file->f_flags |= O_NONBLOCK;
+               spin_unlock(&file->f_lock);
                return 0;
 
        case SNDCTL_DSP_GETCAPS: