Linux 3.10 compat: replace PDE()->data with PDE_DATA()

Linux kernel commit torvalds/linux@d9dda78b renamed PDE() to
PDE_DATA().  To handle this detect the prefered interface
and define a PDE_DATA() wrapper for consistency.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #257
This commit is contained in:
Yuxuan Shui
2013-05-14 08:39:26 +08:00
committed by Brian Behlendorf
parent c02ab72fb9
commit 1ddf9722dc
2 changed files with 23 additions and 1 deletions
+4 -1
View File
@@ -33,6 +33,9 @@
#endif
#define SS_DEBUG_SUBSYS SS_KSTAT
#ifndef HAVE_PDE_DATA
#define PDE_DATA(x) (PDE(x)->data)
#endif
static spinlock_t kstat_lock;
static struct list_head kstat_list;
@@ -359,7 +362,7 @@ proc_kstat_open(struct inode *inode, struct file *filp)
return rc;
f = filp->private_data;
f->private = PDE(inode)->data;
f->private = PDE_DATA(inode);
return rc;
}