diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-22 12:10:22 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 12:57:28 +0400 |
commit | 3be1f2b81f6f9b333fe6fb5ac49c4a419786e859 (patch) | |
tree | 301aa18387f1c4f753d7f9ee7ca59415bc7bae7c /drivers/zorro | |
parent | b959957f9428b05cd5e138beebee04897bfd673d (diff) | |
download | linux-3be1f2b81f6f9b333fe6fb5ac49c4a419786e859.tar.bz2 |
zorro: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/zorro')
-rw-r--r-- | drivers/zorro/proc.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c index 1c15ee7456b6..ea1ce822a8e0 100644 --- a/drivers/zorro/proc.c +++ b/drivers/zorro/proc.c @@ -21,27 +21,7 @@ static loff_t proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) { - loff_t new = -1; - struct inode *inode = file_inode(file); - - mutex_lock(&inode->i_mutex); - switch (whence) { - case 0: - new = off; - break; - case 1: - new = file->f_pos + off; - break; - case 2: - new = sizeof(struct ConfigDev) + off; - break; - } - if (new < 0 || new > sizeof(struct ConfigDev)) - new = -EINVAL; - else - file->f_pos = new; - mutex_unlock(&inode->i_mutex); - return new; + return fixed_size_llseek(file, off, whence, sizeof(struct ConfigDev)); } static ssize_t |