Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178734
b: refs/heads/master
c: 6432e73
h: refs/heads/master
v: v3
  • Loading branch information
John Kacur authored and Linus Torvalds committed Jan 4, 2010
1 parent d4c947c commit bfffeb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: a87da40875f5510866a699b72818cce09b0b9040
refs/heads/master: 6432e734c99ed685e3cad72f7dcae4c65008fcab
11 changes: 5 additions & 6 deletions trunk/drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <linux/err.h>
#include <linux/kfifo.h>
#include <linux/platform_device.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/io.h>
Expand Down Expand Up @@ -905,14 +904,13 @@ static int sonypi_misc_release(struct inode *inode, struct file *file)

static int sonypi_misc_open(struct inode *inode, struct file *file)
{
lock_kernel();
mutex_lock(&sonypi_device.lock);
/* Flush input queue on first open */
if (!sonypi_device.open_count)
kfifo_reset(&sonypi_device.fifo);
sonypi_device.open_count++;
mutex_unlock(&sonypi_device.lock);
unlock_kernel();

return 0;
}

Expand Down Expand Up @@ -955,10 +953,10 @@ static unsigned int sonypi_misc_poll(struct file *file, poll_table *wait)
return 0;
}

static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
static long sonypi_misc_ioctl(struct file *fp,
unsigned int cmd, unsigned long arg)
{
int ret = 0;
long ret = 0;
void __user *argp = (void __user *)arg;
u8 val8;
u16 val16;
Expand Down Expand Up @@ -1074,7 +1072,8 @@ static const struct file_operations sonypi_misc_fops = {
.open = sonypi_misc_open,
.release = sonypi_misc_release,
.fasync = sonypi_misc_fasync,
.ioctl = sonypi_misc_ioctl,
.unlocked_ioctl = sonypi_misc_ioctl,
.llseek = no_llseek,
};

static struct miscdevice sonypi_misc_device = {
Expand Down

0 comments on commit bfffeb9

Please sign in to comment.