Merge ../linus
[pandora-kernel.git] / sound / core / info.c
index 8636683..10c1772 100644 (file)
@@ -114,6 +114,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 +143,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 +267,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 +972,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)
 {