Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[sfrench/cifs-2.6.git] / drivers / char / generic_nvram.c
index ef31738c2cbed6484748038bec890fe8a797fdd8..fda4181b5e67af6f84927ed8807cba101deb8544 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/miscdevice.h>
 #include <linux/fcntl.h>
 #include <linux/init.h>
-#include <linux/smp_lock.h>
 #include <asm/uaccess.h>
 #include <asm/nvram.h>
 #ifdef CONFIG_PPC_PMAC
@@ -32,7 +31,6 @@ static ssize_t nvram_len;
 
 static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
 {
-       lock_kernel();
        switch (origin) {
        case 1:
                offset += file->f_pos;
@@ -41,12 +39,11 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
                offset += nvram_len;
                break;
        }
-       if (offset < 0) {
-               unlock_kernel();
+       if (offset < 0)
                return -EINVAL;
-       }
+
        file->f_pos = offset;
-       unlock_kernel();
+
        return file->f_pos;
 }