Kaynağa Gözat

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.
Cyril Brulebois 3 yıl önce
ebeveyn
işleme
d85944d107
4 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 1 1
      examples/hello-1.c
  2. 1 1
      examples/hello-2.c
  3. 1 1
      examples/hello-3.c
  4. 1 1
      examples/hello-4.c

+ 1 - 1
examples/hello-1.c

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

+ 1 - 1
examples/hello-2.c

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

+ 1 - 1
examples/hello-3.c

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

+ 1 - 1
examples/hello-4.c

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