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/mbcs.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/mbcs.c')
-rw-r--r-- | drivers/char/mbcs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 83bef4efe376..1aeaaba680d2 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/uio.h> | 26 | #include <linux/uio.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/smp_lock.h> | ||
29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
30 | #include <asm/io.h> | 29 | #include <asm/io.h> |
31 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
@@ -42,6 +41,7 @@ | |||
42 | #else | 41 | #else |
43 | #define DBG(fmt...) | 42 | #define DBG(fmt...) |
44 | #endif | 43 | #endif |
44 | static DEFINE_MUTEX(mbcs_mutex); | ||
45 | static int mbcs_major; | 45 | static int mbcs_major; |
46 | 46 | ||
47 | static LIST_HEAD(soft_list); | 47 | static LIST_HEAD(soft_list); |
@@ -385,19 +385,19 @@ static int mbcs_open(struct inode *ip, struct file *fp) | |||
385 | struct mbcs_soft *soft; | 385 | struct mbcs_soft *soft; |
386 | int minor; | 386 | int minor; |
387 | 387 | ||
388 | lock_kernel(); | 388 | mutex_lock(&mbcs_mutex); |
389 | minor = iminor(ip); | 389 | minor = iminor(ip); |
390 | 390 | ||
391 | /* Nothing protects access to this list... */ | 391 | /* Nothing protects access to this list... */ |
392 | list_for_each_entry(soft, &soft_list, list) { | 392 | list_for_each_entry(soft, &soft_list, list) { |
393 | if (soft->nasid == minor) { | 393 | if (soft->nasid == minor) { |
394 | fp->private_data = soft->cxdev; | 394 | fp->private_data = soft->cxdev; |
395 | unlock_kernel(); | 395 | mutex_unlock(&mbcs_mutex); |
396 | return 0; | 396 | return 0; |
397 | } | 397 | } |
398 | } | 398 | } |
399 | 399 | ||
400 | unlock_kernel(); | 400 | mutex_unlock(&mbcs_mutex); |
401 | return -ENODEV; | 401 | return -ENODEV; |
402 | } | 402 | } |
403 | 403 | ||