Hey, I'm just starting module programming and I can insert a simple module but when I try to include the file linux/kernel.h the things that are defined in that file dont get replaced in my program
Code:
#include<linux/module.h>
#include<linux/kernel.h>
int init_module(void)
{
printk(KERN_ALERT "Hello World!");
return 0;
}
void cleanup_module(void)
{
printk("goodbye world.");
}
When i compile that file errors get printed saying that KERN_ALERT was never declared bfore.
I checked the include files and KERN_ALERT stands for "<1>" so i replace it in my source code and the code works fine so I'm sort of confused. I tried to make a test header file and stuck it in /usr/include and that came out fine.
Neone haf ne ideas? :s