meta-digi/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/0009-linux_ac-Fix-for-f_den...

44 lines
1.7 KiB
Diff

From: Isaac Hermida <isaac.hermida@digi.com>
Date: Thu, 21 Apr 2016 13:58:29 +0200
Subject: [PATCH] =?UTF-8?q?linux=5Fac:=20Fix=20for=20=E2=80=98f=5Fdentry?=
=?UTF-8?q?=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://communities.vmware.com/thread/499483?start=0&tstart=0
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
CORE/UTILS/PKTLOG/linux_ac.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/CORE/UTILS/PKTLOG/linux_ac.c b/CORE/UTILS/PKTLOG/linux_ac.c
index b1969ad5d2ba..8d45d7365b2b 100644
--- a/CORE/UTILS/PKTLOG/linux_ac.c
+++ b/CORE/UTILS/PKTLOG/linux_ac.c
@@ -576,7 +576,10 @@ pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
int rem_len;
int start_offset, end_offset;
int fold_offset, ppos_data, cur_rd_offset;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
+ struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
+ PDE_DATA(file_inode(file));
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
PDE_DATA(file->f_dentry->d_inode);
#else
@@ -817,7 +820,10 @@ static struct vm_operations_struct pktlog_vmops = {
static int pktlog_mmap(struct file *file, struct vm_area_struct *vma)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
+ struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
+ PDE_DATA(file_inode(file));
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
PDE_DATA(file->f_dentry->d_inode);
#else