summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-06-23 12:35:26 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 12:57:50 +0400
commitb33159b7d249afae386b91025ef4ea1d7793fc1b (patch)
tree87a21e5ecb54374a587045797bf47294c7fa3705 /arch/powerpc/kernel
parent4a1f2f386b0011782099b4393ee74370916b6aef (diff)
downloadlinux-b33159b7d249afae386b91025ef4ea1d7793fc1b.tar.xz
proc_powerpc: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/proc_powerpc.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c
index feb8580fdc84..c30612aad68e 100644
--- a/arch/powerpc/kernel/proc_powerpc.c
+++ b/arch/powerpc/kernel/proc_powerpc.c
@@ -29,25 +29,9 @@
#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;
- 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);
+ return fixed_size_llseek(file, off, whence, PAGE_SIZE);
}
static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,