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/pcmcia/cm4040_cs.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/pcmcia/cm4040_cs.c')
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index bf2f046fc2c1..d7c32cb40ca3 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/poll.h> | 26 | #include <linux/poll.h> |
27 | #include <linux/smp_lock.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
@@ -48,6 +48,8 @@ | |||
48 | __func__ , ## args); \ | 48 | __func__ , ## args); \ |
49 | } while (0) | 49 | } while (0) |
50 | 50 | ||
51 | static DEFINE_MUTEX(cm4040_mutex); | ||
52 | |||
51 | #define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ) | 53 | #define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ) |
52 | #define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ) | 54 | #define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ) |
53 | #define CCID_DRIVER_MINIMUM_TIMEOUT (3*HZ) | 55 | #define CCID_DRIVER_MINIMUM_TIMEOUT (3*HZ) |
@@ -440,7 +442,7 @@ static int cm4040_open(struct inode *inode, struct file *filp) | |||
440 | if (minor >= CM_MAX_DEV) | 442 | if (minor >= CM_MAX_DEV) |
441 | return -ENODEV; | 443 | return -ENODEV; |
442 | 444 | ||
443 | lock_kernel(); | 445 | mutex_lock(&cm4040_mutex); |
444 | link = dev_table[minor]; | 446 | link = dev_table[minor]; |
445 | if (link == NULL || !pcmcia_dev_present(link)) { | 447 | if (link == NULL || !pcmcia_dev_present(link)) { |
446 | ret = -ENODEV; | 448 | ret = -ENODEV; |
@@ -469,7 +471,7 @@ static int cm4040_open(struct inode *inode, struct file *filp) | |||
469 | DEBUGP(2, dev, "<- cm4040_open (successfully)\n"); | 471 | DEBUGP(2, dev, "<- cm4040_open (successfully)\n"); |
470 | ret = nonseekable_open(inode, filp); | 472 | ret = nonseekable_open(inode, filp); |
471 | out: | 473 | out: |
472 | unlock_kernel(); | 474 | mutex_unlock(&cm4040_mutex); |
473 | return ret; | 475 | return ret; |
474 | } | 476 | } |
475 | 477 | ||