From 8330485de6ca89d72287a40285594945641c53ba Mon Sep 17 00:00:00 2001 From: Manikandan Mohan Date: Wed, 8 Jun 2016 16:29:39 -0700 Subject: [PATCH] qcacmn: Fix compilation error in 4.4v Kernel Fix compilation errors in Kernel 4.4 version. seq_printf function syntax is changed in v4.4 Linux kernel Change-Id: I013171e5bbd4e5641c1a74d22003271c88c63232 CRs-fixed: 1026152 --- wmi/src/wmi_unified.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index a32259f384..c5af2fbccb 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -43,6 +43,22 @@ #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)) +/* TODO Cleanup this backported function */ +int qcacld_bp_seq_printf(struct seq_file *m, const char *f, ...) +{ + va_list args; + + va_start(args, f); + seq_printf(m, f, args); + va_end(args); + + return m->count; +} + +#define seq_printf(m, fmt, ...) qcacld_bp_seq_printf((m), fmt, ##__VA_ARGS__) +#endif + #define WMI_MIN_HEAD_ROOM 64 #ifdef WMI_INTERFACE_EVENT_LOGGING