From e2fb6f4080e7905e3eb7da986d4d42a11ab7e21f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 19 Jan 2014 19:26:29 +0000 Subject: [PATCH] mpt: Use PDE_DATA if available Signed-off-by: Sebastian Herbszt git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5217 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- mpt/mpt_scst.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mpt/mpt_scst.c b/mpt/mpt_scst.c index 07b78d12c..d0458fcdf 100644 --- a/mpt/mpt_scst.c +++ b/mpt/mpt_scst.c @@ -44,14 +44,6 @@ #include #endif -#if defined(CONFIG_SCST_PROC) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -/* - * See also commit "proc: Make the PROC_I() and PDE() macros internal to - * procfs" (c30480b92cf497aa3b463367a82f1c2fdc5c46e9). - */ -#include <../fs/proc/internal.h> /* PDE() */ -#endif - #include "mpt_scst.h" #define MYNAM "mpt_scst" @@ -223,7 +215,11 @@ static ssize_t mpt_proc_target_write(struct file *file, const char __user *buf, size_t length, loff_t *off) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) struct mpt_tgt *tgt = (struct mpt_tgt *)PDE(file->f_dentry->d_inode)->data; +#else + struct mpt_tgt *tgt = (struct mpt_tgt *)PDE_DATA(file->f_dentry->d_inode); +#endif MPT_ADAPTER *ioc = tgt->priv->ioc; int res = 0; char tmp[32+1];