qcacmn: replace PDE_DATA() with pde_data()

In kernel 5.17, PDE_DATA() is replaced with pde_data(). Make
matching change in ath_procfs.c and linux_ac.c files.

Change-Id: Ia198545322146d4adde9330c19b43f5c2ed0dfa2
CRs-Fixed: 3298062
This commit is contained in:
Rajesh Chauhan
2022-09-22 10:26:42 -07:00
committed by Madan Koyyalamudi
parent f4b6b093c6
commit 1cb111d3bc
2 changed files with 19 additions and 3 deletions

View File

@@ -35,6 +35,14 @@
#include "pld_common.h"
#include "target_type.h"
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0))
/*
* Commit 359745d78351 ("proc: remove PDE_DATA() completely")
* Replaced PDE_DATA() with pde_data()
*/
#define pde_data(inode) PDE_DATA(inode)
#endif
#define PROCFS_NAME "athdiagpfs"
#ifdef MULTI_IF_NAME
#define PROCFS_DIR "cld" MULTI_IF_NAME
@@ -72,7 +80,7 @@ static void *get_hif_hdl_from_file(struct file *file)
{
struct hif_opaque_softc *scn;
scn = (struct hif_opaque_softc *)PDE_DATA(file_inode(file));
scn = (struct hif_opaque_softc *)pde_data(file_inode(file));
return (void *)scn;
}

View File

@@ -38,6 +38,14 @@
#include "host_diag_core_log.h"
#include "ani_global.h"
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0))
/*
* Commit 359745d78351 ("proc: remove PDE_DATA() completely")
* Replaced PDE_DATA() with pde_data()
*/
#define pde_data(inode) PDE_DATA(inode)
#endif
#define PKTLOG_DEVNAME_SIZE 32
#define MAX_WLANDEV 1
@@ -876,7 +884,7 @@ __pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
struct ath_pktlog_info *pl_info;
struct ath_pktlog_buf *log_buf;
pl_info = PDE_DATA(file->f_path.dentry->d_inode);
pl_info = pde_data(file->f_path.dentry->d_inode);
if (!pl_info)
return 0;
@@ -1019,7 +1027,7 @@ rd_done:
static ssize_t
pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
{
struct ath_pktlog_info *info = PDE_DATA(file->f_path.dentry->d_inode);
struct ath_pktlog_info *info = pde_data(file->f_path.dentry->d_inode);
struct qdf_op_sync *op_sync;
ssize_t err_size;