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:
Cyril Brulebois 2021-08-16 21:02:55 +02:00
parent 467cc83cc7
commit d85944d107
4 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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");