Commit 74797797 authored by Al Viro's avatar Al Viro

eisa_eeprom: switch to fixed_size_llseek()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c0caa07b
...@@ -31,20 +31,9 @@ ...@@ -31,20 +31,9 @@
#define EISA_EEPROM_MINOR 241 #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) { return fixed_size_llseek(file, offset, origin, HPEE_MAX_LENGTH);
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;
} }
static ssize_t eisa_eeprom_read(struct file * file, static ssize_t eisa_eeprom_read(struct file * file,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment