nhmk/examples/hello-3.c
Andy Shevchenko b8bbcd8a07 treewide: Replace kernel.h by printk.h
The kernel.h should be discouraged for use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2023-02-23 12:54:30 +02:00

25 lines
536 B
C

/*
* hello-3.c - Illustrating the __init, __initdata and __exit macros.
*/
#include <linux/init.h> /* Needed for the macros */
#include <linux/module.h> /* Needed by all modules */
#include <linux/printk.h> /* Needed for pr_info() */
static int hello3_data __initdata = 3;
static int __init hello_3_init(void)
{
pr_info("Hello, world %d\n", hello3_data);
return 0;
}
static void __exit hello_3_exit(void)
{
pr_info("Goodbye, world 3\n");
}
module_init(hello_3_init);
module_exit(hello_3_exit);
MODULE_LICENSE("GPL");