Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175790
b: refs/heads/master
c: 0b048c7
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Benjamin Herrenschmidt committed Nov 24, 2009
1 parent 9f1e775 commit 0f7681a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b03fecd12c4f2a0a3ea33612606320ad23e64fe
refs/heads/master: 0b048c7a1d7f65e3e3f77834c03237be9d6d94b7
11 changes: 3 additions & 8 deletions trunk/drivers/macintosh/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
#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>

#define NVRAM_SIZE 8192

static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
lock_kernel();
switch (origin) {
case 1:
offset += file->f_pos;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 0f7681a

Please sign in to comment.