Skip to contentSkip to conversation

backlight: use pr_warn instead of printk

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

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/7 backlight: use pr_warn instead of printk

This patch uses pr_warn instead of printk to allow dynamic debugging. It also fixes checkpatch warnings as below:

WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ...

Cc Richard Purdie <[email protected]>
---
 drivers/video/backlight/backlight.c |    4 ++--
 drivers/video/backlight/lcd.c       |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/video/backlight/backlight.c +2 -2
index bf5b1ec..ba56075 100644
@@ -378,8 +378,8 @@ static int __init backlight_class_init(void)
 {
 	backlight_class = class_create(THIS_MODULE, "backlight");
 	if (IS_ERR(backlight_class)) {
-		printk(KERN_WARNING "Unable to create backlight class; errno = %ld\n",
-				PTR_ERR(backlight_class));
+		pr_warn("Unable to create backlight class; errno = %ld\n",
+			PTR_ERR(backlight_class));
 		return PTR_ERR(backlight_class);
 	}
 
drivers/video/backlight/lcd.c +2 -2
index 1c298d5..291f1a1 100644
@@ -263,8 +263,8 @@ static int __init lcd_class_init(void)
 {
 	lcd_class = class_create(THIS_MODULE, "lcd");
 	if (IS_ERR(lcd_class)) {
-		printk(KERN_WARNING "Unable to create backlight class; errno = %ld\n",
-				PTR_ERR(lcd_class));
+		pr_warn("Unable to create backlight class; errno = %ld\n",
+			PTR_ERR(lcd_class));
 		return PTR_ERR(lcd_class);
 	}
 
Signature · 1 line
1.7.1