diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-17 11:27:47 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 08:57:29 (GMT) |
commit | 747977976b8caf98b63559f200a5e94189059dc0 (patch) | |
tree | 3df2b1cc357b36f5e61265d48cb53b4ea3afeae9 /drivers/parisc/eisa_eeprom.c | |
parent | c0caa07b6ab714caaea7beaa5a2e3cbf541f0831 (diff) | |
download | linux-747977976b8caf98b63559f200a5e94189059dc0.tar.xz |
eisa_eeprom: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/parisc/eisa_eeprom.c')
-rw-r--r-- | drivers/parisc/eisa_eeprom.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/parisc/eisa_eeprom.c b/drivers/parisc/eisa_eeprom.c index af212c6..783906f 100644 --- a/drivers/parisc/eisa_eeprom.c +++ b/drivers/parisc/eisa_eeprom.c @@ -31,20 +31,9 @@ #define EISA_EEPROM_MINOR 241 -static loff_t eisa_eeprom_llseek(struct file *file, loff_t offset, int origin ) +static loff_t eisa_eeprom_llseek(struct file *file, loff_t offset, int origin) { - switch (origin) { - case 0: - /* nothing to do */ - break; - case 1: - offset += file->f_pos; - break; - case 2: - offset += HPEE_MAX_LENGTH; - break; - } - return (offset >= 0 && offset < HPEE_MAX_LENGTH) ? (file->f_pos = offset) : -EINVAL; + return fixed_size_llseek(file, offset, origin, HPEE_MAX_LENGTH); } static ssize_t eisa_eeprom_read(struct file * file, |