From 3be1f2b81f6f9b333fe6fb5ac49c4a419786e859 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 22 Jun 2013 12:10:22 +0400 Subject: zorro: switch to fixed_size_llseek() Signed-off-by: Al Viro --- drivers/zorro/proc.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'drivers/zorro/proc.c') 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 -- cgit v1.2.1