eisa_eeprom: switch to fixed_size_llseek()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 17 Jun 2013 11:27:47 +0000 (15:27 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Jun 2013 08:57:29 +0000 (12:57 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/parisc/eisa_eeprom.c

index af212c6a615840e7bf777fb931ff2770d490fb5d..783906fe659a2824987fe4b5cc9397c866ba91f7 100644 (file)
 
 #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,