aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/nvram.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/macintosh/nvram.c b/drivers/macintosh/nvram.c
index b195d753d2ed..c876349c32de 100644
--- a/drivers/macintosh/nvram.c
+++ b/drivers/macintosh/nvram.c
@@ -13,7 +13,6 @@
13#include <linux/fcntl.h> 13#include <linux/fcntl.h>
14#include <linux/nvram.h> 14#include <linux/nvram.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/smp_lock.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <asm/nvram.h> 17#include <asm/nvram.h>
19 18
@@ -21,7 +20,6 @@
21 20
22static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) 21static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
23{ 22{
24 lock_kernel();
25 switch (origin) { 23 switch (origin) {
26 case 1: 24 case 1:
27 offset += file->f_pos; 25 offset += file->f_pos;
@@ -30,12 +28,10 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
30 offset += NVRAM_SIZE; 28 offset += NVRAM_SIZE;
31 break; 29 break;
32 } 30 }
33 if (offset < 0) { 31 if (offset < 0)
34 unlock_kernel();
35 return -EINVAL; 32 return -EINVAL;
36 } 33
37 file->f_pos = offset; 34 file->f_pos = offset;
38 unlock_kernel();
39 return file->f_pos; 35 return file->f_pos;
40} 36}
41 37
@@ -76,8 +72,7 @@ static ssize_t write_nvram(struct file *file, const char __user *buf,
76 return p - buf; 72 return p - buf;
77} 73}
78 74
79static int nvram_ioctl(struct inode *inode, struct file *file, 75static long nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
80 unsigned int cmd, unsigned long arg)
81{ 76{
82 switch(cmd) { 77 switch(cmd) {
83 case PMAC_NVRAM_GET_OFFSET: 78 case PMAC_NVRAM_GET_OFFSET: