diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-08-19 18:06:18 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-09 08:39:06 +0200 |
commit | 1a37f5ecb707aded73133e14b58102343de56bbd (patch) | |
tree | dd86fa042e04ee1d7726ffb8dec69d330769da31 /drivers/misc/carma | |
parent | cachefiles_write_page(): switch to __kernel_write() (diff) | |
download | linux-1a37f5ecb707aded73133e14b58102343de56bbd.tar.xz linux-1a37f5ecb707aded73133e14b58102343de56bbd.zip |
carma-fpga: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/misc/carma')
-rw-r--r-- | drivers/misc/carma/carma-fpga-program.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index 7be89832db19..f390deeae3cf 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c @@ -767,26 +767,7 @@ static loff_t fpga_llseek(struct file *filp, loff_t offset, int origin) if ((filp->f_flags & O_ACCMODE) != O_RDONLY) return -EINVAL; - switch (origin) { - case SEEK_SET: /* seek relative to the beginning of the file */ - newpos = offset; - break; - case SEEK_CUR: /* seek relative to current position in the file */ - newpos = filp->f_pos + offset; - break; - case SEEK_END: /* seek relative to the end of the file */ - newpos = priv->fw_size - offset; - break; - default: - return -EINVAL; - } - - /* check for sanity */ - if (newpos > priv->fw_size) - return -EINVAL; - - filp->f_pos = newpos; - return newpos; + return fixed_size_llseek(file, offset, origin, priv->fw_size); } static const struct file_operations fpga_fops = { |