aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/proc_powerpc.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /arch/powerpc/kernel/proc_powerpc.c
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/kernel/proc_powerpc.c')
-rw-r--r--arch/powerpc/kernel/proc_powerpc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c
index c8ae3714e79b..f19d0bdc3241 100644
--- a/arch/powerpc/kernel/proc_powerpc.c
+++ b/arch/powerpc/kernel/proc_powerpc.c
@@ -32,7 +32,7 @@
32static loff_t page_map_seek( struct file *file, loff_t off, int whence) 32static loff_t page_map_seek( struct file *file, loff_t off, int whence)
33{ 33{
34 loff_t new; 34 loff_t new;
35 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 35 struct proc_dir_entry *dp = PDE(file_inode(file));
36 36
37 switch(whence) { 37 switch(whence) {
38 case 0: 38 case 0:
@@ -55,13 +55,13 @@ static loff_t page_map_seek( struct file *file, loff_t off, int whence)
55static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, 55static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes,
56 loff_t *ppos) 56 loff_t *ppos)
57{ 57{
58 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 58 struct proc_dir_entry *dp = PDE(file_inode(file));
59 return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size); 59 return simple_read_from_buffer(buf, nbytes, ppos, dp->data, dp->size);
60} 60}
61 61
62static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) 62static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
63{ 63{
64 struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); 64 struct proc_dir_entry *dp = PDE(file_inode(file));
65 65
66 if ((vma->vm_end - vma->vm_start) > dp->size) 66 if ((vma->vm_end - vma->vm_start) > dp->size)
67 return -EINVAL; 67 return -EINVAL;