Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions audioreach-driver/ar_kcompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,19 @@
static int name(struct gpr_resp_pkt *data, void *priv, int op)
#endif


/*
* MODULE_IMPORT_NS syntax changed in kernel 6.13:
* - < 6.13 : MODULE_IMPORT_NS(DMA_BUF) (unquoted token)
* - >= 6.13: MODULE_IMPORT_NS("DMA_BUF") (quoted string)
*
* AR_MODULE_IMPORT_NS wraps this difference so the driver builds
* correctly on both old and new kernels.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0)
# define AR_MODULE_IMPORT_NS(ns) MODULE_IMPORT_NS(#ns)
#else
# define AR_MODULE_IMPORT_NS(ns) MODULE_IMPORT_NS(ns)
#endif

#endif /* __AR_KCOMPAT_H__ */
3 changes: 2 additions & 1 deletion audioreach-driver/q6apm_audio_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) 2021, Linaro Limited
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.

#include "ar_kcompat.h"
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
Expand Down Expand Up @@ -928,4 +929,4 @@ void q6apm_audio_mem_exit(void)

MODULE_DESCRIPTION("Q6APM audio mem driver");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("DMA_BUF");
AR_MODULE_IMPORT_NS(DMA_BUF);
Loading