summaryrefslogtreecommitdiff
path: root/drivers/zorro
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2010-06-05 15:28:09 +0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2010-08-09 23:14:08 +0400
commitd50ac468dd023db32c9455b2df56237caf601cbd (patch)
tree3effb5ea3e2d574e8810f62a77274cdb21cc7a59 /drivers/zorro
parentd643e2d2cc1d1f37751a99a7c4cb30064cc68aac (diff)
downloadlinux-d50ac468dd023db32c9455b2df56237caf601cbd.tar.xz
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>
Diffstat (limited to 'drivers/zorro')
-rw-r--r--drivers/zorro/proc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c
index 3c7046d79654..4f4ea88fbb71 100644
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -22,8 +22,9 @@ static loff_t
proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
{
loff_t new = -1;
+ struct inode *inode = file->f_path.dentry->d_inode;
- lock_kernel();
+ mutex_lock(&inode->i_mutex);
switch (whence) {
case 0:
new = off;
@@ -35,12 +36,12 @@ proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
new = sizeof(struct ConfigDev) + off;
break;
}
- if (new < 0 || new > sizeof(struct ConfigDev)) {
- unlock_kernel();
- return -EINVAL;
- }
- unlock_kernel();
- return (file->f_pos = new);
+ if (new < 0 || new > sizeof(struct ConfigDev))
+ new = -EINVAL;
+ else
+ file->f_pos = new;
+ mutex_unlock(&inode->i_mutex);
+ return new;
}
static ssize_t