From e3fc4eb4463268cd1cad0b379d12be6082b17e5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Fri, 27 Feb 2015 03:31:52 +0100 Subject: [PATCH] Use file_inode() helper on kernels 3.19 and above. --- init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.c b/init.c index 1536102..6d9685a 100644 --- 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; -- 2.43.5