diff options
| author | 2008-07-18 19:31:12 +0200 | |
|---|---|---|
| committer | 2008-07-18 19:31:12 +0200 | |
| commit | 3e370b29d35fb01bfb92c2814d6f79bf6a2cb970 (patch) | |
| tree | 3b8fb467d60bfe6a34686f4abdc3a60050ba40a4 /drivers/char/sonypi.c | |
| parent | PCI quirks: call boot IRQ quirks at end of device init and during resume (diff) | |
| parent | Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 (diff) | |
| download | linux-dev-3e370b29d35fb01bfb92c2814d6f79bf6a2cb970.tar.xz linux-dev-3e370b29d35fb01bfb92c2814d6f79bf6a2cb970.zip | |
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Conflicts:
drivers/pci/quirks.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/char/sonypi.c')
| -rw-r--r-- | drivers/char/sonypi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 58533de59027..85e0eb76eeab 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -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> @@ -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; } |
