diff --git a/drivers/watchdogtest/Makefile b/drivers/watchdogtest/Makefile index 34b09dd815a7..bfbdc14740ef 100644 --- a/drivers/watchdogtest/Makefile +++ b/drivers/watchdogtest/Makefile @@ -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 \ No newline at end of file + rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers + rm -rf .tmp_versions diff --git a/drivers/watchdogtest/watchdogtest.c b/drivers/watchdogtest/watchdogtest.c index 50fc698e335e..edd5f62f3d47 100644 --- a/drivers/watchdogtest/watchdogtest.c +++ b/drivers/watchdogtest/watchdogtest.c @@ -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;