mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: BKL: introduce CONFIG_BKL. dabusb: remove the BKL sunrpc: remove the big kernel lock init/main.c: remove BKL notations blktrace: remove the big kernel lock rtmutex-tester: make it build without BKL dvb-core: kill the big kernel lock dvb/bt8xx: kill the big kernel lock tlclk: remove big kernel lock fix rawctl compat ioctls breakage on amd64 and itanic uml: kill big kernel lock parisc: remove big kernel lock cris: autoconvert trivial BKL users alpha: kill big kernel lock isapnp: BKL removal s390/block: kill the big kernel lock hpet: kill BKL, add compat_ioctl
This commit is contained in:
commit
5704e44d28
53 changed files with 347 additions and 402 deletions
|
|
@ -19,6 +19,7 @@ comment "Multimedia core support"
|
|||
|
||||
config VIDEO_DEV
|
||||
tristate "Video For Linux"
|
||||
depends on BKL # used in many drivers for ioctl handling, need to kill
|
||||
---help---
|
||||
V4L core support for video capture and overlay devices, webcams and
|
||||
AM/FM radio cards.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/dvb/ca.h>
|
||||
#include "dvbdev.h"
|
||||
|
|
@ -52,6 +52,7 @@
|
|||
} while(0)
|
||||
|
||||
|
||||
static DEFINE_MUTEX(dst_ca_mutex);
|
||||
static unsigned int verbose = 5;
|
||||
module_param(verbose, int, 0644);
|
||||
MODULE_PARM_DESC(verbose, "verbose startup messages, default is 1 (yes)");
|
||||
|
|
@ -564,7 +565,7 @@ static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long ioct
|
|||
void __user *arg = (void __user *)ioctl_arg;
|
||||
int result = 0;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&dst_ca_mutex);
|
||||
dvbdev = file->private_data;
|
||||
state = (struct dst_state *)dvbdev->priv;
|
||||
p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL);
|
||||
|
|
@ -652,7 +653,7 @@ static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long ioct
|
|||
kfree (p_ca_slot_info);
|
||||
kfree (p_ca_caps);
|
||||
|
||||
unlock_kernel();
|
||||
mutex_unlock(&dst_ca_mutex);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/wait.h>
|
||||
|
|
@ -1088,13 +1087,7 @@ static int dvb_demux_do_ioctl(struct file *file,
|
|||
static long dvb_demux_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
return dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl);
|
||||
}
|
||||
|
||||
static unsigned int dvb_demux_poll(struct file *file, poll_table *wait)
|
||||
|
|
@ -1186,13 +1179,7 @@ static int dvb_dvr_do_ioctl(struct file *file,
|
|||
static long dvb_dvr_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
return dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl);
|
||||
}
|
||||
|
||||
static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
|
||||
|
|
|
|||
|
|
@ -1259,13 +1259,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file,
|
|||
static long dvb_ca_en50221_io_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = dvb_usercopy(file, cmd, arg, dvb_ca_en50221_io_do_ioctl);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
return dvb_usercopy(file, cmd, arg, dvb_ca_en50221_io_do_ioctl);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/dvb/net.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/uio.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/crc32.h>
|
||||
|
|
@ -1445,13 +1444,7 @@ static int dvb_net_do_ioctl(struct file *file,
|
|||
static long dvb_net_ioctl(struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = dvb_usercopy(file, cmd, arg, dvb_net_do_ioctl);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
return dvb_usercopy(file, cmd, arg, dvb_net_do_ioctl);
|
||||
}
|
||||
|
||||
static int dvb_net_close(struct inode *inode, struct file *file)
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include "dvbdev.h"
|
||||
|
||||
static DEFINE_MUTEX(dvbdev_mutex);
|
||||
static int dvbdev_debug;
|
||||
|
||||
module_param(dvbdev_debug, int, 0644);
|
||||
|
|
@ -68,7 +68,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
|
|||
{
|
||||
struct dvb_device *dvbdev;
|
||||
|
||||
lock_kernel();
|
||||
mutex_lock(&dvbdev_mutex);
|
||||
down_read(&minor_rwsem);
|
||||
dvbdev = dvb_minors[iminor(inode)];
|
||||
|
||||
|
|
@ -91,12 +91,12 @@ static int dvb_device_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
fops_put(old_fops);
|
||||
up_read(&minor_rwsem);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&dvbdev_mutex);
|
||||
return err;
|
||||
}
|
||||
fail:
|
||||
up_read(&minor_rwsem);
|
||||
unlock_kernel();
|
||||
mutex_unlock(&dvbdev_mutex);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,6 @@ long dvb_generic_ioctl(struct file *file,
|
|||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct dvb_device *dvbdev = file->private_data;
|
||||
int ret;
|
||||
|
||||
if (!dvbdev)
|
||||
return -ENODEV;
|
||||
|
|
@ -166,11 +165,7 @@ long dvb_generic_ioctl(struct file *file,
|
|||
if (!dvbdev->kernel_ioctl)
|
||||
return -EINVAL;
|
||||
|
||||
lock_kernel();
|
||||
ret = dvb_usercopy(file, cmd, arg, dvbdev->kernel_ioctl);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
return dvb_usercopy(file, cmd, arg, dvbdev->kernel_ioctl);
|
||||
}
|
||||
EXPORT_SYMBOL(dvb_generic_ioctl);
|
||||
|
||||
|
|
@ -421,8 +416,10 @@ int dvb_usercopy(struct file *file,
|
|||
}
|
||||
|
||||
/* call driver */
|
||||
mutex_lock(&dvbdev_mutex);
|
||||
if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD)
|
||||
err = -EINVAL;
|
||||
mutex_unlock(&dvbdev_mutex);
|
||||
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/atomic.h>
|
||||
|
|
@ -621,7 +620,6 @@ static int dabusb_open (struct inode *inode, struct file *file)
|
|||
if (devnum < DABUSB_MINOR || devnum >= (DABUSB_MINOR + NRDABUSB))
|
||||
return -EIO;
|
||||
|
||||
lock_kernel();
|
||||
s = &dabusb[devnum - DABUSB_MINOR];
|
||||
|
||||
dbg("dabusb_open");
|
||||
|
|
@ -630,21 +628,17 @@ static int dabusb_open (struct inode *inode, struct file *file)
|
|||
while (!s->usbdev || s->opened) {
|
||||
mutex_unlock(&s->mutex);
|
||||
|
||||
if (file->f_flags & O_NONBLOCK) {
|
||||
if (file->f_flags & O_NONBLOCK)
|
||||
return -EBUSY;
|
||||
}
|
||||
msleep_interruptible(500);
|
||||
|
||||
if (signal_pending (current)) {
|
||||
unlock_kernel();
|
||||
if (signal_pending (current))
|
||||
return -EAGAIN;
|
||||
}
|
||||
mutex_lock(&s->mutex);
|
||||
}
|
||||
if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
|
||||
mutex_unlock(&s->mutex);
|
||||
dev_err(&s->usbdev->dev, "set_interface failed\n");
|
||||
unlock_kernel();
|
||||
return -EINVAL;
|
||||
}
|
||||
s->opened = 1;
|
||||
|
|
@ -654,7 +648,6 @@ static int dabusb_open (struct inode *inode, struct file *file)
|
|||
file->private_data = s;
|
||||
|
||||
r = nonseekable_open(inode, file);
|
||||
unlock_kernel();
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
@ -689,17 +682,13 @@ static long dabusb_ioctl (struct file *file, unsigned int cmd, unsigned long arg
|
|||
|
||||
dbg("dabusb_ioctl");
|
||||
|
||||
lock_kernel();
|
||||
if (s->remove_pending) {
|
||||
unlock_kernel();
|
||||
if (s->remove_pending)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
mutex_lock(&s->mutex);
|
||||
|
||||
if (!s->usbdev) {
|
||||
mutex_unlock(&s->mutex);
|
||||
unlock_kernel();
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
@ -735,7 +724,6 @@ static long dabusb_ioctl (struct file *file, unsigned int cmd, unsigned long arg
|
|||
break;
|
||||
}
|
||||
mutex_unlock(&s->mutex);
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue