aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/scanlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/scanlog.c')
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 554457294a2..47f3cda2a68 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -46,16 +46,12 @@ static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */
static ssize_t scanlog_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- struct inode * inode = file->f_path.dentry->d_inode;
- struct proc_dir_entry *dp;
- unsigned int *data;
+ struct proc_dir_entry *dp = PDE(file_inode(file));
+ unsigned int *data = (unsigned int *)dp->data;
int status;
unsigned long len, off;
unsigned int wait_time;
- dp = PDE(inode);
- data = (unsigned int *)dp->data;
-
if (count > RTAS_DATA_BUF_SIZE)
count = RTAS_DATA_BUF_SIZE;