ALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs
[linux-flexiantxendom0-natty.git] / sound / sound_core.c
index 7c2d677..5580ace 100644 (file)
@@ -104,7 +104,6 @@ module_exit(cleanup_soundcore);
 
 #include <linux/init.h>
 #include <linux/slab.h>
-#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sound.h>
@@ -165,6 +164,7 @@ static const struct file_operations soundcore_fops =
        /* We must have an owner or the module locking fails */
        .owner  = THIS_MODULE,
        .open   = soundcore_open,
+       .llseek = noop_llseek,
 };
 
 /*
@@ -576,8 +576,6 @@ static int soundcore_open(struct inode *inode, struct file *file)
        struct sound_unit *s;
        const struct file_operations *new_fops = NULL;
 
-       lock_kernel ();
-
        chain=unit&0x0F;
        if(chain==4 || chain==5)        /* dsp/audio/dsp16 */
        {
@@ -630,18 +628,19 @@ static int soundcore_open(struct inode *inode, struct file *file)
                const struct file_operations *old_fops = file->f_op;
                file->f_op = new_fops;
                spin_unlock(&sound_loader_lock);
-               if(file->f_op->open)
+
+               if (file->f_op->open)
                        err = file->f_op->open(inode,file);
+
                if (err) {
                        fops_put(file->f_op);
                        file->f_op = fops_get(old_fops);
                }
+
                fops_put(old_fops);
-               unlock_kernel();
                return err;
        }
        spin_unlock(&sound_loader_lock);
-       unlock_kernel();
        return -ENODEV;
 }