ソースを参照

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
Mohammed Ahmed 1 年間 前
コミット
162ac04ff7
3 ファイル変更26 行追加0 行削除
  1. 12 0
      qal/linux/src/i_qal_vbus_dev.h
  2. 6 0
      qdf/linux/src/i_qdf_dev.h
  3. 8 0
      qdf/linux/src/qdf_threads.c

+ 12 - 0
qal/linux/src/i_qal_vbus_dev.h

@@ -430,6 +430,7 @@ __qal_vbus_rcu_read_unlock(void)
 	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
  * 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,
 				       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 */

+ 6 - 0
qdf/linux/src/i_qdf_dev.h

@@ -42,8 +42,14 @@ struct qdf_dev;
 #define __qdf_for_each_online_cpu(cpu) for_each_online_cpu(cpu)
 #define __qdf_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) \
 for_each_cpu_not(cpu, maskp)
+#endif
 
 /**
  * __qdf_dev_alloc_mem() - allocate memory

+ 8 - 0
qdf/linux/src/qdf_threads.c

@@ -362,11 +362,19 @@ qdf_cpumask_equal(const qdf_cpu_mask *src1p, const qdf_cpu_mask *src2p)
 
 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
 qdf_cpumask_complement(qdf_cpu_mask *dstp, const qdf_cpu_mask *srcp)
 {
 	cpumask_complement(dstp, srcp);
 }
+#endif
 
 qdf_export_symbol(qdf_cpumask_complement);