diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-09 15:27:06 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-10-14 11:36:50 -0400 |
commit | 9e8ab74ddaa591575f599248080a1f0d917a56ee (patch) | |
tree | 4e019037c2a5aa8a6efb626b6e12f5ff4407b7ff /drivers/char/nvram.c | |
parent | 6783b9cd7104470a3afab51c205c5aea53a2858f (diff) |
nvram: Drop the bkl from non-generic nvram_llseek()
Drop the bkl from nvram_llseek() as it obviously protects nothing.
The file offset is safe in essence.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/char/nvram.c')
-rw-r--r-- | drivers/char/nvram.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 88cee4099be9..2100a8f7bd86 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #define NVRAM_VERSION "1.3" | 38 | #define NVRAM_VERSION "1.3" |
39 | 39 | ||
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/smp_lock.h> | ||
42 | #include <linux/nvram.h> | 41 | #include <linux/nvram.h> |
43 | 42 | ||
44 | #define PC 1 | 43 | #define PC 1 |
@@ -214,7 +213,6 @@ void nvram_set_checksum(void) | |||
214 | 213 | ||
215 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | 214 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) |
216 | { | 215 | { |
217 | lock_kernel(); | ||
218 | switch (origin) { | 216 | switch (origin) { |
219 | case 0: | 217 | case 0: |
220 | /* nothing to do */ | 218 | /* nothing to do */ |
@@ -226,7 +224,7 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | |||
226 | offset += NVRAM_BYTES; | 224 | offset += NVRAM_BYTES; |
227 | break; | 225 | break; |
228 | } | 226 | } |
229 | unlock_kernel(); | 227 | |
230 | return (offset >= 0) ? (file->f_pos = offset) : -EINVAL; | 228 | return (offset >= 0) ? (file->f_pos = offset) : -EINVAL; |
231 | } | 229 | } |
232 | 230 | ||