zorro: BKL removal

Remove BKL use from proc_bus_zorro_lseek(), like was done for
proc_bus_pci_lseek() a long time ago.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Geert Uytterhoeven
2010-06-05 13:28:09 +02:00
parent d643e2d2cc
commit d50ac468dd

View File

@@ -22,8 +22,9 @@ static loff_t
proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) proc_bus_zorro_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;
@@ -35,12 +36,12 @@ proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
new = sizeof(struct ConfigDev) + off; new = sizeof(struct ConfigDev) + off;
break; break;
} }
if (new < 0 || new > sizeof(struct ConfigDev)) { if (new < 0 || new > sizeof(struct ConfigDev))
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 static ssize_t