diff options
| author | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-06-05 07:28:09 -0400 |
|---|---|---|
| committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-08-09 15:14:08 -0400 |
| commit | d50ac468dd023db32c9455b2df56237caf601cbd (patch) | |
| tree | 3effb5ea3e2d574e8810f62a77274cdb21cc7a59 | |
| parent | d643e2d2cc1d1f37751a99a7c4cb30064cc68aac (diff) | |
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>
| -rw-r--r-- | drivers/zorro/proc.c | 15 |
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 | |||
| 22 | proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) | 22 | proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) |
| 23 | { | 23 | { |
| 24 | loff_t new = -1; | 24 | loff_t new = -1; |
| 25 | struct inode *inode = file->f_path.dentry->d_inode; | ||
| 25 | 26 | ||
| 26 | lock_kernel(); | 27 | mutex_lock(&inode->i_mutex); |
| 27 | switch (whence) { | 28 | switch (whence) { |
| 28 | case 0: | 29 | case 0: |
| 29 | new = off; | 30 | new = off; |
| @@ -35,12 +36,12 @@ proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) | |||
| 35 | new = sizeof(struct ConfigDev) + off; | 36 | new = sizeof(struct ConfigDev) + off; |
| 36 | break; | 37 | break; |
| 37 | } | 38 | } |
| 38 | if (new < 0 || new > sizeof(struct ConfigDev)) { | 39 | if (new < 0 || new > sizeof(struct ConfigDev)) |
| 39 | unlock_kernel(); | 40 | new = -EINVAL; |
| 40 | return -EINVAL; | 41 | else |
| 41 | } | 42 | file->f_pos = new; |
| 42 | unlock_kernel(); | 43 | mutex_unlock(&inode->i_mutex); |
| 43 | return (file->f_pos = new); | 44 | return new; |
| 44 | } | 45 | } |
| 45 | 46 | ||
| 46 | static ssize_t | 47 | static ssize_t |
