proc_powerpc: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
4a1f2f386b
commit
b33159b7d2
1 changed files with 2 additions and 18 deletions
|
@ -29,25 +29,9 @@
|
||||||
|
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
|
|
||||||
static loff_t page_map_seek( struct file *file, loff_t off, int whence)
|
static loff_t page_map_seek(struct file *file, loff_t off, int whence)
|
||||||
{
|
{
|
||||||
loff_t new;
|
return fixed_size_llseek(file, off, whence, PAGE_SIZE);
|
||||||
switch(whence) {
|
|
||||||
case 0:
|
|
||||||
new = off;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
new = file->f_pos + off;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
new = PAGE_SIZE + off;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
if ( new < 0 || new > PAGE_SIZE )
|
|
||||||
return -EINVAL;
|
|
||||||
return (file->f_pos = new);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,
|
static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,
|
||||||
|
|
Loading…
Reference in a new issue