watchdogtest: support build in kernel-5.10

Modify "defined" to "IS_ENABLED" fix
build can't find CONFIG_QCOM_WDT_CORE.

Change-Id: Ic489e3f0baab16c1b16cb662bda90b4513a63398
Signed-off-by: qianlong <qianl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2026594
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
qianlong 2021-07-28 20:15:53 +08:00 committed by qianl2
parent 01cbdfaf7d
commit b56272ba70
2 changed files with 11 additions and 7 deletions

View file

@ -1,10 +1,14 @@
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
all: modules
all:
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
modules:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
%:
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
clean:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
rm -rf .tmp_versions

View file

@ -75,9 +75,9 @@ static int watchdog_test_init(void)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
trigger_wdog_bite = (void *)kallsyms_lookup_name("msm_trigger_wdog_bite");
#else
#if defined(CONFIG_QCOM_WATCHDOG_V2)
#if IS_ENABLED(CONFIG_QCOM_WATCHDOG_V2)
trigger_wdog_bite = msm_trigger_wdog_bite;
#elif defined(CONFIG_QCOM_WDT_CORE)
#elif IS_ENABLED(CONFIG_QCOM_WDT_CORE)
trigger_wdog_bite = qcom_wdt_trigger_bite;
#else
trigger_wdog_bite = NULL;