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/pci | |
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/pci')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_sysfs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c index 56215322930..4cb30447a48 100644 --- a/drivers/pci/hotplug/cpqphp_sysfs.c +++ b/drivers/pci/hotplug/cpqphp_sysfs.c | |||
@@ -34,10 +34,11 @@ | |||
34 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
35 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
36 | #include <linux/pci_hotplug.h> | 36 | #include <linux/pci_hotplug.h> |
37 | #include <linux/smp_lock.h> | 37 | #include <linux/mutex.h> |
38 | #include <linux/debugfs.h> | 38 | #include <linux/debugfs.h> |
39 | #include "cpqphp.h" | 39 | #include "cpqphp.h" |
40 | 40 | ||
41 | static DEFINE_MUTEX(cpqphp_mutex); | ||
41 | static int show_ctrl (struct controller *ctrl, char *buf) | 42 | static int show_ctrl (struct controller *ctrl, char *buf) |
42 | { | 43 | { |
43 | char *out = buf; | 44 | char *out = buf; |
@@ -147,7 +148,7 @@ static int open(struct inode *inode, struct file *file) | |||
147 | struct ctrl_dbg *dbg; | 148 | struct ctrl_dbg *dbg; |
148 | int retval = -ENOMEM; | 149 | int retval = -ENOMEM; |
149 | 150 | ||
150 | lock_kernel(); | 151 | mutex_lock(&cpqphp_mutex); |
151 | dbg = kmalloc(sizeof(*dbg), GFP_KERNEL); | 152 | dbg = kmalloc(sizeof(*dbg), GFP_KERNEL); |
152 | if (!dbg) | 153 | if (!dbg) |
153 | goto exit; | 154 | goto exit; |
@@ -160,7 +161,7 @@ static int open(struct inode *inode, struct file *file) | |||
160 | file->private_data = dbg; | 161 | file->private_data = dbg; |
161 | retval = 0; | 162 | retval = 0; |
162 | exit: | 163 | exit: |
163 | unlock_kernel(); | 164 | mutex_unlock(&cpqphp_mutex); |
164 | return retval; | 165 | return retval; |
165 | } | 166 | } |
166 | 167 | ||
@@ -169,7 +170,7 @@ static loff_t lseek(struct file *file, loff_t off, int whence) | |||
169 | struct ctrl_dbg *dbg; | 170 | struct ctrl_dbg *dbg; |
170 | loff_t new = -1; | 171 | loff_t new = -1; |
171 | 172 | ||
172 | lock_kernel(); | 173 | mutex_lock(&cpqphp_mutex); |
173 | dbg = file->private_data; | 174 | dbg = file->private_data; |
174 | 175 | ||
175 | switch (whence) { | 176 | switch (whence) { |
@@ -181,10 +182,10 @@ static loff_t lseek(struct file *file, loff_t off, int whence) | |||
181 | break; | 182 | break; |
182 | } | 183 | } |
183 | if (new < 0 || new > dbg->size) { | 184 | if (new < 0 || new > dbg->size) { |
184 | unlock_kernel(); | 185 | mutex_unlock(&cpqphp_mutex); |
185 | return -EINVAL; | 186 | return -EINVAL; |
186 | } | 187 | } |
187 | unlock_kernel(); | 188 | mutex_unlock(&cpqphp_mutex); |
188 | return (file->f_pos = new); | 189 | return (file->f_pos = new); |
189 | } | 190 | } |
190 | 191 | ||