diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:49:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:49:54 -0400 |
commit | c37927d4359e81b85de644f8fb08878717cf5f3f (patch) | |
tree | 25dabf2d905e1410819d1bdaba0bf5f779100d3c /drivers/char/generic_nvram.c | |
parent | 5704e44d283e907623e3775c1262f206a2c48cf3 (diff) | |
parent | 2a48fc0ab24241755dc93bfd4f01d68efab47f5a (diff) |
Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
block: autoconvert trivial BKL users to private mutex
drivers: autoconvert trivial BKL users to private mutex
ipmi: autoconvert trivial BKL users to private mutex
mac: autoconvert trivial BKL users to private mutex
mtd: autoconvert trivial BKL users to private mutex
scsi: autoconvert trivial BKL users to private mutex
Fix up trivial conflicts (due to addition of private mutex right next to
deletion of a version string) in drivers/char/pcmcia/cm40[04]0_cs.c
Diffstat (limited to 'drivers/char/generic_nvram.c')
-rw-r--r-- | drivers/char/generic_nvram.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index 82b5a88a82d7..0e941b57482e 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/miscdevice.h> | 19 | #include <linux/miscdevice.h> |
20 | #include <linux/fcntl.h> | 20 | #include <linux/fcntl.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/smp_lock.h> | 22 | #include <linux/mutex.h> |
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <asm/nvram.h> | 24 | #include <asm/nvram.h> |
25 | #ifdef CONFIG_PPC_PMAC | 25 | #ifdef CONFIG_PPC_PMAC |
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #define NVRAM_SIZE 8192 | 29 | #define NVRAM_SIZE 8192 |
30 | 30 | ||
31 | static DEFINE_MUTEX(nvram_mutex); | ||
31 | static ssize_t nvram_len; | 32 | static ssize_t nvram_len; |
32 | 33 | ||
33 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) | 34 | static loff_t nvram_llseek(struct file *file, loff_t offset, int origin) |
@@ -120,9 +121,9 @@ static long nvram_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned l | |||
120 | { | 121 | { |
121 | int ret; | 122 | int ret; |
122 | 123 | ||
123 | lock_kernel(); | 124 | mutex_lock(&nvram_mutex); |
124 | ret = nvram_ioctl(file, cmd, arg); | 125 | ret = nvram_ioctl(file, cmd, arg); |
125 | unlock_kernel(); | 126 | mutex_unlock(&nvram_mutex); |
126 | 127 | ||
127 | return ret; | 128 | return ret; |
128 | } | 129 | } |