]> err.no Git - linux-2.6/blobdiff - sound/core/info.c
[PATCH] SoftMAC: Prevent multiple authentication attempts on the same network
[linux-2.6] / sound / core / info.c
index 86366839c4bb78a7a8d152c6ead9f6ef25fcf945..340332c6d97337889e73927730747feecd6e37a6 100644 (file)
@@ -29,7 +29,6 @@
 #include <sound/info.h>
 #include <sound/version.h>
 #include <linux/proc_fs.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/mutex.h>
 #include <stdarg.h>
 
@@ -114,6 +113,7 @@ int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...)
        int len, res;
        int err = 0;
 
+       might_sleep();
        if (buffer->stop || buffer->error)
                return 0;
        len = buffer->len - buffer->size;
@@ -142,12 +142,12 @@ EXPORT_SYMBOL(snd_iprintf);
 
  */
 
-static struct proc_dir_entry *snd_proc_root = NULL;
-struct snd_info_entry *snd_seq_root = NULL;
+static struct proc_dir_entry *snd_proc_root;
+struct snd_info_entry *snd_seq_root;
 EXPORT_SYMBOL(snd_seq_root);
 
 #ifdef CONFIG_SND_OSSEMUL
-struct snd_info_entry *snd_oss_root = NULL;
+struct snd_info_entry *snd_oss_root;
 #endif
 
 static inline void snd_info_entry_prepare(struct proc_dir_entry *de)
@@ -266,7 +266,7 @@ static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer
                buf = data->wbuffer;
                if (buf == NULL)
                        return -EIO;
-               mutex_unlock(&entry->access);
+               mutex_lock(&entry->access);
                if (pos + count >= buf->len) {
                        if (resize_info_buffer(buf, pos + count)) {
                                mutex_unlock(&entry->access);
@@ -971,7 +971,7 @@ EXPORT_SYMBOL(snd_info_unregister);
 
  */
 
-static struct snd_info_entry *snd_info_version_entry = NULL;
+static struct snd_info_entry *snd_info_version_entry;
 
 static void snd_info_version_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 {