]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
Use file_inode() helper on kernels 3.19 and above. master
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 27 Feb 2015 02:31:52 +0000 (03:31 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 27 Feb 2015 02:31:52 +0000 (03:31 +0100)
init.c

diff --git a/init.c b/init.c
index 15361022e7b23ac83c526f91b6cefa8fe1576a41..6d9685a0cb126eeb778472e3bacb04ba47bc82d3 100644 (file)
--- a/init.c
+++ b/init.c
@@ -196,7 +196,11 @@ static int omnibook_feature_show(struct seq_file *m, void *v)
 }
 static ssize_t omnibook_feature_write(struct file *f, const char __user *userbuf, size_t s, loff_t *off)
 {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+       struct omnibook_feature *feature = PDE_DATA(file_inode(f));
+#else
        struct omnibook_feature *feature = PDE_DATA(f->f_dentry->d_inode);
+#endif
        char *kernbuf;
        int retval;