mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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
This commit is contained in:
commit
c37927d435
100 changed files with 614 additions and 556 deletions
|
|
@ -24,7 +24,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/phantom.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/io.h>
|
||||
|
|
@ -38,6 +38,7 @@
|
|||
#define PHB_RUNNING 1
|
||||
#define PHB_NOT_OH 2
|
||||
|
||||
static DEFINE_MUTEX(phantom_mutex);
|
||||
static struct class *phantom_class;
|
||||
static int phantom_major;
|
||||
|
||||
|
|
@ -215,17 +216,17 @@ static int phantom_open(struct inode *inode, struct file *file)
|
|||
struct phantom_device *dev = container_of(inode->i_cdev,
|
||||
struct phantom_device, cdev);
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&phantom_mutex);
|
||||
nonseekable_open(inode, file);
|
||||
|
||||
if (mutex_lock_interruptible(&dev->open_lock)) {
|
||||
unlock_kernel();
|
||||
mutex_unlock(&phantom_mutex);
|
||||
return -ERESTARTSYS;
|
||||
}
|
||||
|
||||
if (dev->opened) {
|
||||
mutex_unlock(&dev->open_lock);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&phantom_mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -236,7 +237,7 @@ static int phantom_open(struct inode *inode, struct file *file)
|
|||
atomic_set(&dev->counter, 0);
|
||||
dev->opened++;
|
||||
mutex_unlock(&dev->open_lock);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&phantom_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue