aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-06-05 07:28:09 -0400
committerArnd Bergmann <arnd@arndb.de>2010-09-26 10:25:52 -0400
commit6117d2130c9da5977e975ad9fa607b86d6516a44 (patch)
tree33bdc9860f330dce32867b7eea4b96d0c56fb2c1
parentcfdb00a77ea7d5fb922fd985e5dfbcb36873411b (diff)
isapnp: BKL removal
Remove BKL use from isapnp_proc_bus_lseek(), like was done for proc_bus_pci_lseek() a long time ago and recently for Zorro by Geert Uytterhoeven. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jaroslav Kysela <perex@perex.cz>
-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,