diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-11 17:12:17 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-11 17:12:17 -0800 |
commit | 501706565b2d4d2d40d0d301d5411ede099b8a6f (patch) | |
tree | 142a18bf1f1e74a09dbfa27540b893ade0fd797d /drivers/char/nvram.c | |
parent | e93737b0f0159a61772894943199fd3b6f315641 (diff) | |
parent | 2fe77b81c77eed92c4c0439f74c8148a295b4a86 (diff) | |
download | linux-3.10-501706565b2d4d2d40d0d301d5411ede099b8a6f.tar.gz linux-3.10-501706565b2d4d2d40d0d301d5411ede099b8a6f.tar.bz2 linux-3.10-501706565b2d4d2d40d0d301d5411ede099b8a6f.zip |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
include/net/tcp.h
Diffstat (limited to 'drivers/char/nvram.c')
-rw-r--r-- | drivers/char/nvram.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 88cee4099be..4008e2ce73c 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -38,7 +38,6 @@ #define NVRAM_VERSION "1.3" #include <linux/module.h> -#include <linux/smp_lock.h> #include <linux/nvram.h> #define PC 1 @@ -111,6 +110,7 @@ #include <linux/spinlock.h> #include <linux/io.h> #include <linux/uaccess.h> +#include <linux/smp_lock.h> #include <asm/system.h> @@ -214,7 +214,6 @@ void nvram_set_checksum(void) static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) { - lock_kernel(); switch (origin) { case 0: /* nothing to do */ @@ -226,7 +225,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) offset += NVRAM_BYTES; break; } - unlock_kernel(); + return (offset >= 0) ? (file->f_pos = offset) : -EINVAL; } |