qcacmn: cmn changes for sun compilation

Current code has compilation errors
when compiling for sun. Specifically
of_get_named_gpio_flags() was removed
from the newer kernel. So this change
removes function call on newer kernel
version.

Change-Id: I55d060f1dcae65dea1fc0043b98b03f2b10246df
CRs-Fixed: 3632175
This commit is contained in:
Mohammed Ahmed
2023-10-03 14:09:20 -07:00
committed by Ravindra Konda
parent 7dbcea96f9
commit 162ac04ff7
3 changed files with 26 additions and 0 deletions

View File

@@ -430,6 +430,7 @@ __qal_vbus_rcu_read_unlock(void)
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0))
/** /**
* __qal_vbus_of_get_named_gpio_flags() - Get a GPIO descriptor and flags * __qal_vbus_of_get_named_gpio_flags() - Get a GPIO descriptor and flags
* for GPIO API * for GPIO API
@@ -448,4 +449,15 @@ __qal_vbus_of_get_named_gpio_flags(struct qdf_device_node *np,
return of_get_named_gpio_flags((struct device_node *)np, return of_get_named_gpio_flags((struct device_node *)np,
list_name, index, flags); list_name, index, flags);
} }
#else
static inline int
__qal_vbus_of_get_named_gpio_flags(struct qdf_device_node *np,
const char *list_name,
int index, __qdf_of_gpio_flags *flags)
{
QDF_ASSERT(0);
return QDF_STATUS_E_NOSUPPORT;
}
#endif
#endif /* __I_QAL_VBUS_DEV_H */ #endif /* __I_QAL_VBUS_DEV_H */

View File

@@ -42,8 +42,14 @@ struct qdf_dev;
#define __qdf_for_each_online_cpu(cpu) for_each_online_cpu(cpu) #define __qdf_for_each_online_cpu(cpu) for_each_online_cpu(cpu)
#define __qdf_for_each_cpu(cpu, maskp) \ #define __qdf_for_each_cpu(cpu, maskp) \
for_each_cpu(cpu, maskp) for_each_cpu(cpu, maskp)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0))
#define __qdf_for_each_cpu_not(cpu, maskp) \
for_each_cpu_andnot(cpu, cpu_possible_mask, maskp)
#else
#define __qdf_for_each_cpu_not(cpu, maskp) \ #define __qdf_for_each_cpu_not(cpu, maskp) \
for_each_cpu_not(cpu, maskp) for_each_cpu_not(cpu, maskp)
#endif
/** /**
* __qdf_dev_alloc_mem() - allocate memory * __qdf_dev_alloc_mem() - allocate memory

View File

@@ -362,11 +362,19 @@ qdf_cpumask_equal(const qdf_cpu_mask *src1p, const qdf_cpu_mask *src2p)
qdf_export_symbol(qdf_cpumask_equal); qdf_export_symbol(qdf_cpumask_equal);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0))
void
qdf_cpumask_complement(qdf_cpu_mask *dstp, const qdf_cpu_mask *srcp)
{
cpumask_andnot(dstp, cpu_possible_mask, srcp);
}
#else
void void
qdf_cpumask_complement(qdf_cpu_mask *dstp, const qdf_cpu_mask *srcp) qdf_cpumask_complement(qdf_cpu_mask *dstp, const qdf_cpu_mask *srcp)
{ {
cpumask_complement(dstp, srcp); cpumask_complement(dstp, srcp);
} }
#endif
qdf_export_symbol(qdf_cpumask_complement); qdf_export_symbol(qdf_cpumask_complement);