Skip to contentSkip to conversation

backlight: generic_bl: use pr_info instead of printk

PATCH Superseded Jingoo Han 1 participant 1 message May 16, 2012

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH v2 4/7 backlight: generic_bl: use pr_info instead of printk

This patch uses pr_info instead of printk to allow dynamic debugging. The pr_fmt prefix for pr_ macros is used. It also fixes checkpatch warnings as below:

WARNING: printk() should include KERN_ facility level

Cc Richard Purdie <[email protected]>
---
 drivers/video/backlight/generic_bl.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/video/backlight/generic_bl.c +4 -2
index 9ce6170..96437e6 100644
@@ -9,6 +9,8 @@
  *
  */
 
+#define pr_fmt(fmt) "generic_bl: " fmt
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -106,7 +108,7 @@ static int genericbl_probe(struct platform_device *pdev)
 
 	generic_backlight_device = bd;
 
-	printk("Generic Backlight Driver Initialized.\n");
+	pr_info("Generic Backlight Driver Initialized.\n");
 	return 0;
 }
 
@@ -120,7 +122,7 @@ static int genericbl_remove(struct platform_device *pdev)
 
 	backlight_device_unregister(bd);
 
-	printk("Generic Backlight Driver Unloaded\n");
+	pr_info("Generic Backlight Driver Unloaded\n");
 	return 0;
 }
 
Signature · 1 line
1.7.1