Commit 6117d213 authored by Arnd Bergmann's avatar Arnd Bergmann

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: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jaroslav Kysela <perex@perex.cz>
parent cfdb00a7
...@@ -31,8 +31,9 @@ static struct proc_dir_entry *isapnp_proc_bus_dir = NULL; ...@@ -31,8 +31,9 @@ static struct proc_dir_entry *isapnp_proc_bus_dir = NULL;
static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
{ {
loff_t new = -1; loff_t new = -1;
struct inode *inode = file->f_path.dentry->d_inode;
lock_kernel(); mutex_lock(&inode->i_mutex);
switch (whence) { switch (whence) {
case 0: case 0:
new = off; new = off;
...@@ -44,12 +45,12 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) ...@@ -44,12 +45,12 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
new = 256 + off; new = 256 + off;
break; break;
} }
if (new < 0 || new > 256) { if (new < 0 || new > 256)
unlock_kernel(); new = -EINVAL;
return -EINVAL; else
} file->f_pos = new;
unlock_kernel(); mutex_unlock(&inode->i_mutex);
return (file->f_pos = new); return new;
} }
static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment