I have a Linux module that has a debug function, and I just want to call this function in debug mode. Now I have code like this:
if (console_loglevel >= CONSOLE_LOGLEVEL_DEBUG)
dump_my_message(dev, my_msg);
But when you create this code in linux-next, it will throw below errors:
CHK include/generated/uapi/linux/version.h
Kernel: arch/x86/boot/bzImage is ready (
Building modules, stage 2.
MODPOST 2738 modules
ERROR: "console_printk" [drivers/mymodule.ko] undefined!
scripts/Makefile.modpost:91: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
Makefile:1117: recipe for target 'modules' failed
make: *** [modules] Error 2
Can you help figure out how to do this? thank!!!
source
share