mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:00:52 +07:00
eisa_eeprom: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c0caa07b6a
commit
747977976b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user