diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-17 15:23:54 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 12:57:28 +0400 |
commit | c0caa07b6ab714caaea7beaa5a2e3cbf541f0831 (patch) | |
tree | dfc96e4cf3746ec88ecd3554af378c5140fb1481 /drivers | |
parent | 3be1f2b81f6f9b333fe6fb5ac49c4a419786e859 (diff) | |
download | linux-c0caa07b6ab714caaea7beaa5a2e3cbf541f0831.tar.bz2 |
bna: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c index 94d957d203a6..7d6aa8c87df8 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c +++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c @@ -230,32 +230,12 @@ bnad_debugfs_open_drvinfo(struct inode *inode, struct file *file) static loff_t bnad_debugfs_lseek(struct file *file, loff_t offset, int orig) { - loff_t pos = file->f_pos; struct bnad_debug_info *debug = file->private_data; if (!debug) return -EINVAL; - switch (orig) { - case 0: - file->f_pos = offset; - break; - case 1: - file->f_pos += offset; - break; - case 2: - file->f_pos = debug->buffer_len + offset; - break; - default: - return -EINVAL; - } - - if (file->f_pos < 0 || file->f_pos > debug->buffer_len) { - file->f_pos = pos; - return -EINVAL; - } - - return file->f_pos; + return fixed_size_llseek(file, offset, orig, debug->buffer_len); } static ssize_t |