From: Al Viro Date: Mon, 17 Jun 2013 11:27:47 +0000 (+0400) Subject: eisa_eeprom: switch to fixed_size_llseek() X-Git-Tag: firefly_0821_release~176^2~5811^2~33 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=747977976b8caf98b63559f200a5e94189059dc0;p=firefly-linux-kernel-4.4.55.git eisa_eeprom: switch to fixed_size_llseek() Signed-off-by: Al Viro --- diff --git a/drivers/parisc/eisa_eeprom.c b/drivers/parisc/eisa_eeprom.c index af212c6a6158..783906fe659a 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,