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 | |
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')
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 12 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index c7b482d15e2a..c4e52ec85c6e 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/bitrev.h> | 32 | #include <linux/bitrev.h> |
33 | #include <linux/smp_lock.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/uaccess.h> | 34 | #include <linux/uaccess.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | 36 | ||
@@ -54,6 +54,8 @@ | |||
54 | __func__ , ## args); \ | 54 | __func__ , ## args); \ |
55 | } while (0) | 55 | } while (0) |
56 | 56 | ||
57 | static DEFINE_MUTEX(cmm_mutex); | ||
58 | |||
57 | #define T_1SEC (HZ) | 59 | #define T_1SEC (HZ) |
58 | #define T_10MSEC msecs_to_jiffies(10) | 60 | #define T_10MSEC msecs_to_jiffies(10) |
59 | #define T_20MSEC msecs_to_jiffies(20) | 61 | #define T_20MSEC msecs_to_jiffies(20) |
@@ -1415,7 +1417,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
1415 | iminor(inode), ioctl_names[_IOC_NR(cmd)]); | 1417 | iminor(inode), ioctl_names[_IOC_NR(cmd)]); |
1416 | #endif | 1418 | #endif |
1417 | 1419 | ||
1418 | lock_kernel(); | 1420 | mutex_lock(&cmm_mutex); |
1419 | rc = -ENODEV; | 1421 | rc = -ENODEV; |
1420 | link = dev_table[iminor(inode)]; | 1422 | link = dev_table[iminor(inode)]; |
1421 | if (!pcmcia_dev_present(link)) { | 1423 | if (!pcmcia_dev_present(link)) { |
@@ -1623,7 +1625,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
1623 | rc = -ENOTTY; | 1625 | rc = -ENOTTY; |
1624 | } | 1626 | } |
1625 | out: | 1627 | out: |
1626 | unlock_kernel(); | 1628 | mutex_unlock(&cmm_mutex); |
1627 | return rc; | 1629 | return rc; |
1628 | } | 1630 | } |
1629 | 1631 | ||
@@ -1637,7 +1639,7 @@ static int cmm_open(struct inode *inode, struct file *filp) | |||
1637 | if (minor >= CM4000_MAX_DEV) | 1639 | if (minor >= CM4000_MAX_DEV) |
1638 | return -ENODEV; | 1640 | return -ENODEV; |
1639 | 1641 | ||
1640 | lock_kernel(); | 1642 | mutex_lock(&cmm_mutex); |
1641 | link = dev_table[minor]; | 1643 | link = dev_table[minor]; |
1642 | if (link == NULL || !pcmcia_dev_present(link)) { | 1644 | if (link == NULL || !pcmcia_dev_present(link)) { |
1643 | ret = -ENODEV; | 1645 | ret = -ENODEV; |
@@ -1682,7 +1684,7 @@ static int cmm_open(struct inode *inode, struct file *filp) | |||
1682 | DEBUGP(2, dev, "<- cmm_open\n"); | 1684 | DEBUGP(2, dev, "<- cmm_open\n"); |
1683 | ret = nonseekable_open(inode, filp); | 1685 | ret = nonseekable_open(inode, filp); |
1684 | out: | 1686 | out: |
1685 | unlock_kernel(); | 1687 | mutex_unlock(&cmm_mutex); |
1686 | return ret; | 1688 | return ret; |
1687 | } | 1689 | } |
1688 | 1690 | ||
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 | ||