aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp/proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 13:43:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 13:43:11 -0400
commit5704e44d283e907623e3775c1262f206a2c48cf3 (patch)
tree0a981b24173e90854e7b7d812b35859e1e5f0174 /drivers/pnp/isapnp/proc.c
parent91151240ed8e97cc4457dae4094153c2744f1eb8 (diff)
parent6de5bd128d381ad88ac6d419a5e597048eb468cf (diff)
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
Diffstat (limited to 'drivers/pnp/isapnp/proc.c')
-rw-r--r--drivers/pnp/isapnp/proc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 3f94edab25fa..e73ebefdf3e0 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -31,8 +31,9 @@ static struct proc_dir_entry *isapnp_proc_bus_dir = NULL;
31static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) 31static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
32{ 32{
33 loff_t new = -1; 33 loff_t new = -1;
34 struct inode *inode = file->f_path.dentry->d_inode;
34 35
35 lock_kernel(); 36 mutex_lock(&inode->i_mutex);
36 switch (whence) { 37 switch (whence) {
37 case 0: 38 case 0:
38 new = off; 39 new = off;
@@ -44,12 +45,12 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
44 new = 256 + off; 45 new = 256 + off;
45 break; 46 break;
46 } 47 }
47 if (new < 0 || new > 256) { 48 if (new < 0 || new > 256)
48 unlock_kernel(); 49 new = -EINVAL;
49 return -EINVAL; 50 else
50 } 51 file->f_pos = new;
51 unlock_kernel(); 52 mutex_unlock(&inode->i_mutex);
52 return (file->f_pos = new); 53 return new;
53} 54}
54 55
55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, 56static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf,