Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18821b04 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'bkl-drivers-for-linus' of...

Merge branch 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  agp: Remove the BKL from agp_open
  inifiband: Remove BKL from ipath_open()
  mips: Remove BKL from tb0219
  drivers: Remove BKL from scx200_gpio
  drivers: Remove BKL from pc8736x_gpio
  parisc: Remove BKL from eisa_eeprom
  rtc: Remove BKL from efirtc
  input: Remove BKL from hp_sdc_rtc
  hw_random: Remove BKL from core
  macintosh: Remove BKL from ans-lcd
  nvram: Drop the bkl from non-generic nvram_llseek()
  nvram: Drop the bkl from nvram_llseek()
  mem_class: Drop the bkl from memory_open()
  spi: Remove BKL from spidev_open
  drivers: Remove BKL from cs5535_gpio
  drivers: Remove BKL from misc_open
parents 3b8ecd22 55e858c8
Loading
Loading
Loading
Loading
+11 −17
Original line number Diff line number Diff line
@@ -676,25 +676,25 @@ static int agp_open(struct inode *inode, struct file *file)
	int minor = iminor(inode);
	struct agp_file_private *priv;
	struct agp_client *client;
	int rc = -ENXIO;

	lock_kernel();
	mutex_lock(&(agp_fe.agp_mutex));

	if (minor != AGPGART_MINOR)
		goto err_out;
		return -ENXIO;

	mutex_lock(&(agp_fe.agp_mutex));

	priv = kzalloc(sizeof(struct agp_file_private), GFP_KERNEL);
	if (priv == NULL)
		goto err_out_nomem;
	if (priv == NULL) {
		mutex_unlock(&(agp_fe.agp_mutex));
		return -ENOMEM;
	}

	set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags);
	priv->my_pid = current->pid;

	if (capable(CAP_SYS_RAWIO)) {
	if (capable(CAP_SYS_RAWIO))
		/* Root priv, can be controller */
		set_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags);
	}

	client = agp_find_client_by_pid(current->pid);

	if (client != NULL) {
@@ -704,16 +704,10 @@ static int agp_open(struct inode *inode, struct file *file)
	file->private_data = (void *) priv;
	agp_insert_file_private(priv);
	DBG("private=%p, client=%p", priv, client);
	mutex_unlock(&(agp_fe.agp_mutex));
	unlock_kernel();
	return 0;

err_out_nomem:
	rc = -ENOMEM;
err_out:
	mutex_unlock(&(agp_fe.agp_mutex));
	unlock_kernel();
	return rc;

	return 0;
}


+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include <linux/cdev.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/io.h>

@@ -158,7 +158,6 @@ static int cs5535_gpio_open(struct inode *inode, struct file *file)
{
	u32 m = iminor(inode);

	cycle_kernel_lock();
	/* the mask says which pins are usable by this driver */
	if ((mask & (1 << m)) == 0)
		return -EINVAL;
+1 −11
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@
 * 	- Add module support
 */


#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
@@ -174,13 +172,12 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
			return -EINVAL;

		case RTC_RD_TIME:
			lock_kernel();
			spin_lock_irqsave(&efi_rtc_lock, flags);

			status = efi.get_time(&eft, &cap);

			spin_unlock_irqrestore(&efi_rtc_lock,flags);
			unlock_kernel();

			if (status != EFI_SUCCESS) {
				/* should never happen */
				printk(KERN_ERR "efitime: can't read time\n");
@@ -202,13 +199,11 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,

			convert_to_efi_time(&wtime, &eft);

			lock_kernel();
			spin_lock_irqsave(&efi_rtc_lock, flags);

			status = efi.set_time(&eft);

			spin_unlock_irqrestore(&efi_rtc_lock,flags);
			unlock_kernel();

			return status == EFI_SUCCESS ? 0 : -EINVAL;

@@ -224,7 +219,6 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,

			convert_to_efi_time(&wtime, &eft);

			lock_kernel();
			spin_lock_irqsave(&efi_rtc_lock, flags);
			/*
			 * XXX Fixme:
@@ -235,19 +229,16 @@ static long efi_rtc_ioctl(struct file *file, unsigned int cmd,
			status = efi.set_wakeup_time((efi_bool_t)enabled, &eft);

			spin_unlock_irqrestore(&efi_rtc_lock,flags);
			unlock_kernel();

			return status == EFI_SUCCESS ? 0 : -EINVAL;

		case RTC_WKALM_RD:

			lock_kernel();
			spin_lock_irqsave(&efi_rtc_lock, flags);

			status = efi.get_wakeup_time((efi_bool_t *)&enabled, (efi_bool_t *)&pending, &eft);

			spin_unlock_irqrestore(&efi_rtc_lock,flags);
			unlock_kernel();

			if (status != EFI_SUCCESS) return -EINVAL;

@@ -277,7 +268,6 @@ static int efi_rtc_open(struct inode *inode, struct file *file)
	 * We do accept multiple open files at the same time as we
	 * synchronize on the per call operation.
	 */
	cycle_kernel_lock();
	return 0;
}

+3 −6
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <linux/miscdevice.h>
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/nvram.h>
#ifdef CONFIG_PPC_PMAC
@@ -32,7 +31,6 @@ static ssize_t nvram_len;

static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
{
	lock_kernel();
	switch (origin) {
	case 1:
		offset += file->f_pos;
@@ -41,12 +39,11 @@ static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
		offset += nvram_len;
		break;
	}
	if (offset < 0) {
		unlock_kernel();
	if (offset < 0)
		return -EINVAL;
	}

	file->f_pos = offset;
	unlock_kernel();

	return file->f_pos;
}

+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ static int rng_dev_open(struct inode *inode, struct file *filp)
		return -EINVAL;
	if (filp->f_mode & FMODE_WRITE)
		return -EINVAL;
	cycle_kernel_lock();
	return 0;
}

Loading