Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102006
b: refs/heads/master
c: 52d1102
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Andi Kleen committed Jul 16, 2008
1 parent 1672c43 commit 763b963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: ebb12db51f6c13b30752fcf506baad4c617b153c
refs/heads/master: 52d11025dba32bed696eaee1822b26529e764770
11 changes: 7 additions & 4 deletions trunk/kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/console.h>
#include <linux/cpu.h>
#include <linux/freezer.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>

Expand Down Expand Up @@ -164,8 +165,8 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf,
return res;
}

static int snapshot_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
static long snapshot_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
int error = 0;
struct snapshot_data *data;
Expand All @@ -181,6 +182,8 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,

data = filp->private_data;

lock_kernel();

switch (cmd) {

case SNAPSHOT_FREEZE:
Expand Down Expand Up @@ -389,7 +392,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
error = -ENOTTY;

}

unlock_kernel();
return error;
}

Expand All @@ -399,7 +402,7 @@ static const struct file_operations snapshot_fops = {
.read = snapshot_read,
.write = snapshot_write,
.llseek = no_llseek,
.ioctl = snapshot_ioctl,
.unlocked_ioctl = snapshot_ioctl,
};

static struct miscdevice snapshot_device = {
Expand Down

0 comments on commit 763b963

Please sign in to comment.