X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fparisc%2Feisa_eeprom.c;h=783906fe659a2824987fe4b5cc9397c866ba91f7;hb=c5dbcf8b70b50b1f6ef4850f61d79204ea46d761;hp=af212c6a615840e7bf777fb931ff2770d490fb5d;hpb=87450bd55d6f7caa472b5db49a97ca373baf2577;p=karo-tx-linux.git 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,