diff --git a/drivers/watchdogtest/Kbuild b/drivers/watchdogtest/Kbuild index d8eee6e505d0..4b499571a86f 100644 --- a/drivers/watchdogtest/Kbuild +++ b/drivers/watchdogtest/Kbuild @@ -1,5 +1,6 @@ # add -Wall to try to catch everything we can. EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include +EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include -obj-m += watchdogtest.o \ No newline at end of file +obj-m += watchdogtest.o +KBUILD_EXTRA_SYMBOLS += $(KBUILD_OUTPUT)/Module.symvers diff --git a/drivers/watchdogtest/watchdogtest.c b/drivers/watchdogtest/watchdogtest.c index db60fd205ad5..1bc434a13f58 100644 --- a/drivers/watchdogtest/watchdogtest.c +++ b/drivers/watchdogtest/watchdogtest.c @@ -17,6 +17,7 @@ #include #include #include +#include static struct dentry *dbgfs_fire_softlockup; static struct dentry *dbgfs_fire_watchdog; @@ -71,7 +72,15 @@ static int watchdog_test_init(void) dbgfs_fire_watchdog = debugfs_create_file("fire_watchdog_reset", 0200, NULL, NULL, &fire_watchdog_reset_fops); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) trigger_wdog_bite = (void *)kallsyms_lookup_name("msm_trigger_wdog_bite"); +#else +#ifdef CONFIG_ARCH_QCOM + trigger_wdog_bite = msm_trigger_wdog_bite; +#else + trigger_wdog_bite = NULL; +#endif +#endif if (!trigger_wdog_bite) printk(KERN_ERR "Failed to get msm_trigger_wdog_bite address\n"); return 0;