aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/nvram.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-01-18 09:56:22 +1100
committerJames Morris <jmorris@namei.org>2010-01-18 09:56:22 +1100
commit2457552d1e6f3183cd93f81c49a8da5fe8bb0e42 (patch)
tree7ca46caa910012d75617700e4083b3657053cb31 /drivers/macintosh/nvram.c
parentselinux: change the handling of unknown classes (diff)
parentpage allocator: update NR_FREE_PAGES only when necessary (diff)
downloadlinux-dev-2457552d1e6f3183cd93f81c49a8da5fe8bb0e42.tar.xz
linux-dev-2457552d1e6f3183cd93f81c49a8da5fe8bb0e42.zip
Merge branch 'master' into next
Diffstat (limited to 'drivers/macintosh/nvram.c')
-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 @@
#include <linux/fcntl.h>
#include <linux/nvram.h>
#include <linux/init.h>
-#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/nvram.h>
@@ -21,7 +20,6 @@
static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
- lock_kernel();
switch (origin) {
case 1:
offset += file->f_pos;
@@ -30,12 +28,10 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
offset += NVRAM_SIZE;
break;
}
- if (offset < 0) {
- unlock_kernel();
+ if (offset < 0)
return -EINVAL;
- }
+
file->f_pos = offset;
- unlock_kernel();
return file->f_pos;
}
@@ -76,8 +72,7 @@ static ssize_t write_nvram(struct file *file, const char __user *buf,
return p - buf;
}
-static int nvram_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch(cmd) {
case PMAC_NVRAM_GET_OFFSET: