diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-09-18 18:58:33 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-09-18 18:58:33 +0400 |
commit | 4ba25a496f62129a2ad8c2436ab2b402752dc66c (patch) | |
tree | 8abf41a79f293832a430a9609530c24cd365466c /drivers/scsi/bfa/bfad_debugfs.c | |
parent | 390de835b61228abf6646f2b14530edca8d7512f (diff) | |
parent | 6e4664525b1db28f8c4e1130957f70a94c19213e (diff) | |
download | linux-4ba25a496f62129a2ad8c2436ab2b402752dc66c.tar.xz |
Merge tag 'v3.11' into next
Merge with mainline to bring in sync changes to cyttsp4 driver.
Diffstat (limited to 'drivers/scsi/bfa/bfad_debugfs.c')
-rw-r--r-- | drivers/scsi/bfa/bfad_debugfs.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/scsi/bfa/bfad_debugfs.c index 439c012be763..8e83d0474fe7 100644 --- a/drivers/scsi/bfa/bfad_debugfs.c +++ b/drivers/scsi/bfa/bfad_debugfs.c @@ -173,31 +173,9 @@ bfad_debugfs_open_reg(struct inode *inode, struct file *file) static loff_t bfad_debugfs_lseek(struct file *file, loff_t offset, int orig) { - struct bfad_debug_info *debug; - loff_t pos = file->f_pos; - - debug = file->private_data; - - 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; + struct bfad_debug_info *debug = file->private_data; + return fixed_size_llseek(file, offset, orig, + debug->buffer_len); } static ssize_t |