mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-25 17:56:36 +08:00
Mention pr_info() rather than KERN_INFO
The latter might have been used along with printk() in an earlier version, but pr_info() is getting used consistently so adjust the #include comments accordingly. For the avoidance of doubt, pr_info() actually comes from printk.h, which gets #include'd by kernel.h.
This commit is contained in:
parent
467cc83cc7
commit
d85944d107
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* hello-1.c - The simplest kernel module.
|
||||
*/
|
||||
#include <linux/kernel.h> /* Needed for KERN_INFO */
|
||||
#include <linux/kernel.h> /* Needed for pr_info() */
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
|
||||
int init_module(void)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* This is preferred over using init_module() and cleanup_module().
|
||||
*/
|
||||
#include <linux/init.h> /* Needed for the macros */
|
||||
#include <linux/kernel.h> /* Needed for KERN_INFO */
|
||||
#include <linux/kernel.h> /* Needed for pr_info() */
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
|
||||
static int __init hello_2_init(void)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* hello-3.c - Illustrating the __init, __initdata and __exit macros.
|
||||
*/
|
||||
#include <linux/init.h> /* Needed for the macros */
|
||||
#include <linux/kernel.h> /* Needed for KERN_INFO */
|
||||
#include <linux/kernel.h> /* Needed for pr_info() */
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
|
||||
static int hello3_data __initdata = 3;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* hello-4.c - Demonstrates module documentation.
|
||||
*/
|
||||
#include <linux/init.h> /* Needed for the macros */
|
||||
#include <linux/kernel.h> /* Needed for KERN_INFO */
|
||||
#include <linux/kernel.h> /* Needed for pr_info() */
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
Loading…
Reference in New Issue
Block a user