mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -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
|
|
@ -29,7 +29,6 @@
|
|||
#include <linux/blkdev.h>
|
||||
#include <linux/blkpg.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mutex.h>
|
||||
|
|
@ -38,6 +37,7 @@
|
|||
|
||||
#include "mtdcore.h"
|
||||
|
||||
static DEFINE_MUTEX(mtd_blkdevs_mutex);
|
||||
static LIST_HEAD(blktrans_majors);
|
||||
static DEFINE_MUTEX(blktrans_ref_mutex);
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
|
|||
if (!dev)
|
||||
return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&mtd_blkdevs_mutex);
|
||||
mutex_lock(&dev->lock);
|
||||
|
||||
if (!dev->mtd) {
|
||||
|
|
@ -198,7 +198,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
|
|||
unlock:
|
||||
mutex_unlock(&dev->lock);
|
||||
blktrans_dev_put(dev);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&mtd_blkdevs_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
|
|||
if (!dev)
|
||||
return ret;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&mtd_blkdevs_mutex);
|
||||
mutex_lock(&dev->lock);
|
||||
|
||||
/* Release one reference, we sure its not the last one here*/
|
||||
|
|
@ -223,7 +223,7 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)
|
|||
unlock:
|
||||
mutex_unlock(&dev->lock);
|
||||
blktrans_dev_put(dev);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&mtd_blkdevs_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
|
|||
if (!dev)
|
||||
return ret;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&mtd_blkdevs_mutex);
|
||||
mutex_lock(&dev->lock);
|
||||
|
||||
if (!dev->mtd)
|
||||
|
|
@ -271,7 +271,7 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
|
|||
}
|
||||
unlock:
|
||||
mutex_unlock(&dev->lock);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&mtd_blkdevs_mutex);
|
||||
blktrans_dev_put(dev);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/mount.h>
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
#include <asm/uaccess.h>
|
||||
|
||||
#define MTD_INODE_FS_MAGIC 0x11307854
|
||||
static DEFINE_MUTEX(mtd_mutex);
|
||||
static struct vfsmount *mtd_inode_mnt __read_mostly;
|
||||
|
||||
/*
|
||||
|
|
@ -90,7 +91,7 @@ static int mtd_open(struct inode *inode, struct file *file)
|
|||
if ((file->f_mode & FMODE_WRITE) && (minor & 1))
|
||||
return -EACCES;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&mtd_mutex);
|
||||
mtd = get_mtd_device(NULL, devnum);
|
||||
|
||||
if (IS_ERR(mtd)) {
|
||||
|
|
@ -138,7 +139,7 @@ static int mtd_open(struct inode *inode, struct file *file)
|
|||
file->private_data = mfi;
|
||||
|
||||
out:
|
||||
unlock_kernel();
|
||||
mutex_unlock(&mtd_mutex);
|
||||
return ret;
|
||||
} /* mtd_open */
|
||||
|
||||
|
|
@ -866,9 +867,9 @@ static long mtd_unlocked_ioctl(struct file *file, u_int cmd, u_long arg)
|
|||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&mtd_mutex);
|
||||
ret = mtd_ioctl(file, cmd, arg);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&mtd_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -892,7 +893,7 @@ static long mtd_compat_ioctl(struct file *file, unsigned int cmd,
|
|||
void __user *argp = compat_ptr(arg);
|
||||
int ret = 0;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&mtd_mutex);
|
||||
|
||||
switch (cmd) {
|
||||
case MEMWRITEOOB32:
|
||||
|
|
@ -927,7 +928,7 @@ static long mtd_compat_ioctl(struct file *file, unsigned int cmd,
|
|||
ret = mtd_ioctl(file, cmd, (unsigned long)argp);
|
||||
}
|
||||
|
||||
unlock_kernel();
|
||||
mutex_unlock(&mtd_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue