mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Add macro to close debug function in user build
Add macro to close debug function in user build And fix GKI build issue in user build Change-Id: I741cabc03e50d454f005025fd14e08764cdc5949 Signed-off-by: zhuangnk1 <zhuangnk1@lenovo.com> Reviewed-on: https://gerrit.mot.com/2782369 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Tao Sun <suntao2@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
0fa0bc5060
commit
e6bb2a2018
3 changed files with 21 additions and 6 deletions
|
|
@ -1,6 +1,11 @@
|
|||
DLKM_DIR := motorola/kernel/modules
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
||||
KERNEL_CFLAGS += CONFIG_QM35_SPI_DEBUG_FW=y
|
||||
KBUILD_OPTIONS += CONFIG_QM35_SPI_DEBUG_FW=y
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := qm35.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
EXTRA_CFLAGS += -Wall
|
||||
EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include
|
||||
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_QM35_SPI_DEBUG_FW)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_QM35_SPI_DEBUG_FW
|
||||
endif
|
||||
|
||||
obj-m := qm35.o
|
||||
|
||||
qm35-y := \
|
||||
|
|
@ -21,7 +26,9 @@ qm35-y := \
|
|||
debug.o \
|
||||
hsspi_test.o
|
||||
|
||||
qm35-y += debug_qmrom.o
|
||||
ifneq ($(filter m y,$(CONFIG_QM35_SPI_DEBUG_FW)),)
|
||||
qm35-y += debug_qmrom.o
|
||||
endif
|
||||
qm35-y += qm35-trace.o
|
||||
|
||||
KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../../mmi_info/Module.symvers
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@
|
|||
#include "debug.h"
|
||||
#include "hsspi_test.h"
|
||||
|
||||
//#if IS_ENABLED(CONFIG_QM35_SPI_DEBUG_FW)
|
||||
#if IS_ENABLED(CONFIG_QM35_SPI_DEBUG_FW)
|
||||
extern void debug_rom_code_init(struct debug *debug);
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
static const struct file_operations debug_enable_fops;
|
||||
static const struct file_operations debug_log_level_fops;
|
||||
|
|
@ -318,8 +318,11 @@ int debug_create_module_entry(struct debug *debug,
|
|||
|
||||
void debug_new_trace_available(struct debug *debug)
|
||||
{
|
||||
if (debug->pv_filp)
|
||||
if (debug->pv_filp) {
|
||||
#if IS_ENABLED(CONFIG_QM35_SPI_DEBUG_FW)
|
||||
fsnotify_modify(debug->pv_filp);
|
||||
#endif
|
||||
}
|
||||
|
||||
wake_up_interruptible(&debug->wq);
|
||||
}
|
||||
|
|
@ -440,9 +443,9 @@ int debug_init(struct debug *debug)
|
|||
goto unregister;
|
||||
}
|
||||
|
||||
//#if IS_ENABLED(CONFIG_QM35_SPI_DEBUG_FW)
|
||||
#if IS_ENABLED(CONFIG_QM35_SPI_DEBUG_FW)
|
||||
debug_rom_code_init(debug);
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue