aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/scanlog.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 18:16:14 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:32 -0400
commitd9dda78bad879595d8c4220a067fc029d6484a16 (patch)
tree376c47ed566b719009e753e917104b150a639b11 /arch/powerpc/platforms/pseries/scanlog.c
parent8510e30b46cd5467b2f930bef68a276dbc2c7d7c (diff)
procfs: new helper - PDE_DATA(inode)
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/platforms/pseries/scanlog.c')
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 47f3cda2a68b..cc220d2061b2 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -46,8 +46,7 @@ static struct proc_dir_entry *proc_ppc64_scan_log_dump; /* The proc file */
46static ssize_t scanlog_read(struct file *file, char __user *buf, 46static ssize_t scanlog_read(struct file *file, char __user *buf,
47 size_t count, loff_t *ppos) 47 size_t count, loff_t *ppos)
48{ 48{
49 struct proc_dir_entry *dp = PDE(file_inode(file)); 49 unsigned int *data = PDE_DATA(file_inode(file));
50 unsigned int *data = (unsigned int *)dp->data;
51 int status; 50 int status;
52 unsigned long len, off; 51 unsigned long len, off;
53 unsigned int wait_time; 52 unsigned int wait_time;
@@ -135,8 +134,7 @@ static ssize_t scanlog_write(struct file * file, const char __user * buf,
135 134
136static int scanlog_open(struct inode * inode, struct file * file) 135static int scanlog_open(struct inode * inode, struct file * file)
137{ 136{
138 struct proc_dir_entry *dp = PDE(inode); 137 unsigned int *data = PDE_DATA(file_inode(file));
139 unsigned int *data = (unsigned int *)dp->data;
140 138
141 if (data[0] != 0) { 139 if (data[0] != 0) {
142 /* This imperfect test stops a second copy of the 140 /* This imperfect test stops a second copy of the
@@ -152,8 +150,7 @@ static int scanlog_open(struct inode * inode, struct file * file)
152 150
153static int scanlog_release(struct inode * inode, struct file * file) 151static int scanlog_release(struct inode * inode, struct file * file)
154{ 152{
155 struct proc_dir_entry *dp = PDE(inode); 153 unsigned int *data = PDE_DATA(file_inode(file));
156 unsigned int *data = (unsigned int *)dp->data;
157 154
158 data[0] = 0; 155 data[0] = 0;
159 156