Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100382
b: refs/heads/master
c: f8f2c79
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent 212e6db commit a3685b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0410e689b19b6ca010a6a44abfa820968ae15733
refs/heads/master: f8f2c79d594463427f7114cedb1555110d547d89
3 changes: 3 additions & 0 deletions trunk/drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#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 @@ -906,12 +907,14 @@ 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

0 comments on commit a3685b4

Please sign in to comment.