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/block/pktcdvd.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/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 37a2bb595076..044b84e6f147 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <linux/seq_file.h> | 57 | #include <linux/seq_file.h> |
58 | #include <linux/miscdevice.h> | 58 | #include <linux/miscdevice.h> |
59 | #include <linux/freezer.h> | 59 | #include <linux/freezer.h> |
60 | #include <linux/smp_lock.h> | ||
61 | #include <linux/mutex.h> | 60 | #include <linux/mutex.h> |
62 | #include <linux/slab.h> | 61 | #include <linux/slab.h> |
63 | #include <scsi/scsi_cmnd.h> | 62 | #include <scsi/scsi_cmnd.h> |
@@ -86,6 +85,7 @@ | |||
86 | 85 | ||
87 | #define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1)) | 86 | #define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1)) |
88 | 87 | ||
88 | static DEFINE_MUTEX(pktcdvd_mutex); | ||
89 | static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; | 89 | static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; |
90 | static struct proc_dir_entry *pkt_proc; | 90 | static struct proc_dir_entry *pkt_proc; |
91 | static int pktdev_major; | 91 | static int pktdev_major; |
@@ -2383,7 +2383,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode) | |||
2383 | 2383 | ||
2384 | VPRINTK(DRIVER_NAME": entering open\n"); | 2384 | VPRINTK(DRIVER_NAME": entering open\n"); |
2385 | 2385 | ||
2386 | lock_kernel(); | 2386 | mutex_lock(&pktcdvd_mutex); |
2387 | mutex_lock(&ctl_mutex); | 2387 | mutex_lock(&ctl_mutex); |
2388 | pd = pkt_find_dev_from_minor(MINOR(bdev->bd_dev)); | 2388 | pd = pkt_find_dev_from_minor(MINOR(bdev->bd_dev)); |
2389 | if (!pd) { | 2389 | if (!pd) { |
@@ -2411,7 +2411,7 @@ static int pkt_open(struct block_device *bdev, fmode_t mode) | |||
2411 | } | 2411 | } |
2412 | 2412 | ||
2413 | mutex_unlock(&ctl_mutex); | 2413 | mutex_unlock(&ctl_mutex); |
2414 | unlock_kernel(); | 2414 | mutex_unlock(&pktcdvd_mutex); |
2415 | return 0; | 2415 | return 0; |
2416 | 2416 | ||
2417 | out_dec: | 2417 | out_dec: |
@@ -2419,7 +2419,7 @@ out_dec: | |||
2419 | out: | 2419 | out: |
2420 | VPRINTK(DRIVER_NAME": failed open (%d)\n", ret); | 2420 | VPRINTK(DRIVER_NAME": failed open (%d)\n", ret); |
2421 | mutex_unlock(&ctl_mutex); | 2421 | mutex_unlock(&ctl_mutex); |
2422 | unlock_kernel(); | 2422 | mutex_unlock(&pktcdvd_mutex); |
2423 | return ret; | 2423 | return ret; |
2424 | } | 2424 | } |
2425 | 2425 | ||
@@ -2428,7 +2428,7 @@ static int pkt_close(struct gendisk *disk, fmode_t mode) | |||
2428 | struct pktcdvd_device *pd = disk->private_data; | 2428 | struct pktcdvd_device *pd = disk->private_data; |
2429 | int ret = 0; | 2429 | int ret = 0; |
2430 | 2430 | ||
2431 | lock_kernel(); | 2431 | mutex_lock(&pktcdvd_mutex); |
2432 | mutex_lock(&ctl_mutex); | 2432 | mutex_lock(&ctl_mutex); |
2433 | pd->refcnt--; | 2433 | pd->refcnt--; |
2434 | BUG_ON(pd->refcnt < 0); | 2434 | BUG_ON(pd->refcnt < 0); |
@@ -2437,7 +2437,7 @@ static int pkt_close(struct gendisk *disk, fmode_t mode) | |||
2437 | pkt_release_dev(pd, flush); | 2437 | pkt_release_dev(pd, flush); |
2438 | } | 2438 | } |
2439 | mutex_unlock(&ctl_mutex); | 2439 | mutex_unlock(&ctl_mutex); |
2440 | unlock_kernel(); | 2440 | mutex_unlock(&pktcdvd_mutex); |
2441 | return ret; | 2441 | return ret; |
2442 | } | 2442 | } |
2443 | 2443 | ||
@@ -2773,7 +2773,7 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, | |||
2773 | VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, | 2773 | VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, |
2774 | MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev)); | 2774 | MAJOR(bdev->bd_dev), MINOR(bdev->bd_dev)); |
2775 | 2775 | ||
2776 | lock_kernel(); | 2776 | mutex_lock(&pktcdvd_mutex); |
2777 | switch (cmd) { | 2777 | switch (cmd) { |
2778 | case CDROMEJECT: | 2778 | case CDROMEJECT: |
2779 | /* | 2779 | /* |
@@ -2798,7 +2798,7 @@ static int pkt_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, | |||
2798 | VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd); | 2798 | VPRINTK(DRIVER_NAME": Unknown ioctl for %s (%x)\n", pd->name, cmd); |
2799 | ret = -ENOTTY; | 2799 | ret = -ENOTTY; |
2800 | } | 2800 | } |
2801 | unlock_kernel(); | 2801 | mutex_unlock(&pktcdvd_mutex); |
2802 | 2802 | ||
2803 | return ret; | 2803 | return ret; |
2804 | } | 2804 | } |