summaryrefslogtreecommitdiffstats
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)
downloadtalos-op-linux-d9dda78bad879595d8c4220a067fc029d6484a16.tar.gz
talos-op-linux-d9dda78bad879595d8c4220a067fc029d6484a16.zip
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 */
static ssize_t scanlog_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- struct proc_dir_entry *dp = PDE(file_inode(file));
- unsigned int *data = (unsigned int *)dp->data;
+ unsigned int *data = PDE_DATA(file_inode(file));
int status;
unsigned long len, off;
unsigned int wait_time;
@@ -135,8 +134,7 @@ static ssize_t scanlog_write(struct file * file, const char __user * buf,
static int scanlog_open(struct inode * inode, struct file * file)
{
- struct proc_dir_entry *dp = PDE(inode);
- unsigned int *data = (unsigned int *)dp->data;
+ unsigned int *data = PDE_DATA(file_inode(file));
if (data[0] != 0) {
/* This imperfect test stops a second copy of the
@@ -152,8 +150,7 @@ static int scanlog_open(struct inode * inode, struct file * file)
static int scanlog_release(struct inode * inode, struct file * file)
{
- struct proc_dir_entry *dp = PDE(inode);
- unsigned int *data = (unsigned int *)dp->data;
+ unsigned int *data = PDE_DATA(file_inode(file));
data[0] = 0;
OpenPOWER on IntegriCloud