From 042b7ca9932f05ed7c69efc7b15fa58e42c6eb3c Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 28 Aug 2020 14:50:51 +0200 Subject: [KERNEL] convert debug messages and clean up code This change converts all debug messages to support the Linux kernel's dynamic debug feature. Debug messages can be enabled or disabled by the debug feature if the - kernel module is built in debug mode (EXTRA_CFLAGS=-g -DDEBUG) - Linux kernel supports dynamic debug (CONFIG_DYNAMIC_DEBUG is set) This patch removes outdated kernel compatibility macros (used for Linux kernels in version 4.x) and cleans up the kernel module's code. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 21865e5..89a44eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,8 +231,8 @@ IF(BUILD_KERNEL_MODULE) SET(KERNEL_DIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/build") ENDIF() - SET(KERNEL_C_FLAGS "") - IF(KERNEL_C_FLAGS MATCHES Debug) + SET(KERNEL_C_FLAGS "" CACHE STRING "Additional C flags to be used for building the kernel module") + IF(CMAKE_BUILD_TYPE MATCHES Debug) SET(KERNEL_C_FLAGS "-g -DDEBUG") ENDIF() -- cgit v1.2.3-55-g7522