diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-17 07:27:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 04:57:29 -0400 |
commit | 747977976b8caf98b63559f200a5e94189059dc0 (patch) | |
tree | 3df2b1cc357b36f5e61265d48cb53b4ea3afeae9 | |
parent | c0caa07b6ab714caaea7beaa5a2e3cbf541f0831 (diff) |
eisa_eeprom: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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 af212c6a6158..783906fe659a 100644 --- a/drivers/parisc/eisa_eeprom.c +++ b/drivers/parisc/eisa_eeprom.c | |||
@@ -31,20 +31,9 @@ | |||
31 | 31 | ||
32 | #define EISA_EEPROM_MINOR 241 | 32 | #define EISA_EEPROM_MINOR 241 |
33 | 33 | ||
34 | static loff_t eisa_eeprom_llseek(struct file *file, loff_t offset, int origin ) | 34 | static loff_t eisa_eeprom_llseek(struct file *file, loff_t offset, int origin) |
35 | { | 35 | { |
36 | switch (origin) { | 36 | return fixed_size_llseek(file, offset, origin, HPEE_MAX_LENGTH); |
37 | case 0: | ||
38 | /* nothing to do */ | ||
39 | break; | ||
40 | case 1: | ||
41 | offset += file->f_pos; | ||
42 | break; | ||
43 | case 2: | ||
44 | offset += HPEE_MAX_LENGTH; | ||
45 | break; | ||
46 | } | ||
47 | return (offset >= 0 && offset < HPEE_MAX_LENGTH) ? (file->f_pos = offset) : -EINVAL; | ||
48 | } | 37 | } |
49 | 38 | ||
50 | static ssize_t eisa_eeprom_read(struct file * file, | 39 | static ssize_t eisa_eeprom_read(struct file * file, |