From d9dda78bad879595d8c4220a067fc029d6484a16 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 31 Mar 2013 18:16:14 -0400 Subject: 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 --- drivers/media/pci/zoran/zoran_procfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/pci/zoran') diff --git a/drivers/media/pci/zoran/zoran_procfs.c b/drivers/media/pci/zoran/zoran_procfs.c index e084b0a21b1b..07a104d2bd1d 100644 --- a/drivers/media/pci/zoran/zoran_procfs.c +++ b/drivers/media/pci/zoran/zoran_procfs.c @@ -130,14 +130,14 @@ static int zoran_show(struct seq_file *p, void *v) static int zoran_open(struct inode *inode, struct file *file) { - struct zoran *data = PDE(inode)->data; + struct zoran *data = PDE_DATA(inode); return single_open(file, zoran_show, data); } static ssize_t zoran_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { - struct zoran *zr = PDE(file_inode(file))->data; + struct zoran *zr = PDE_DATA(file_inode(file)); char *string, *sp; char *line, *ldelim, *varname, *svar, *tdelim; -- cgit v1.2.3 From 0c2f343825192044ffaf542854d478e00f7f0a59 Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 12 Apr 2013 15:18:25 +0100 Subject: zoran: Don't print proc_dir_entry data in debug Don't print proc_dir_entry data in debug as we're soon to have no direct access to the contents of the PDE. Print what was put in there instead. Signed-off-by: David Howells cc: mjpeg-users@lists.sourceforge.net cc: linux-media@vger.kernel.org Signed-off-by: Al Viro --- drivers/media/pci/zoran/zoran_procfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/pci/zoran') diff --git a/drivers/media/pci/zoran/zoran_procfs.c b/drivers/media/pci/zoran/zoran_procfs.c index 07a104d2bd1d..f7ceee0cdefd 100644 --- a/drivers/media/pci/zoran/zoran_procfs.c +++ b/drivers/media/pci/zoran/zoran_procfs.c @@ -201,7 +201,7 @@ zoran_proc_init (struct zoran *zr) dprintk(2, KERN_INFO "%s: procfs entry /proc/%s allocated. data=%p\n", - ZR_DEVNAME(zr), name, zr->zoran_proc->data); + ZR_DEVNAME(zr), name, zr); } else { dprintk(1, KERN_ERR "%s: Unable to initialise /proc/%s\n", ZR_DEVNAME(zr), name); -- cgit v1.2.3