diff options
author | Jingoo Han <jg1.han@samsung.com> | 2012-05-29 18:07:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:29 -0400 |
commit | 35f961623cee5212d4ee0baa8c34b1766913b36b (patch) | |
tree | a68358ec16195a57273cd22595368b3b3850864b /drivers/video/backlight/lcd.c | |
parent | 71d7225cd4275e7fd7003dd6ec42320905eacc7d (diff) |
backlight: use pr_warn() and pr_debug() instead of printk()
Use pr_warn() and pr_debug() instead of printk to allow dynamic debugging.
The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings
as below:
WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ...
[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight/lcd.c')
-rw-r--r-- | drivers/video/backlight/lcd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 1c298d5bf3af..a5d0d024bb92 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
9 | |||
8 | #include <linux/module.h> | 10 | #include <linux/module.h> |
9 | #include <linux/init.h> | 11 | #include <linux/init.h> |
10 | #include <linux/device.h> | 12 | #include <linux/device.h> |
@@ -116,7 +118,7 @@ static ssize_t lcd_store_power(struct device *dev, | |||
116 | 118 | ||
117 | mutex_lock(&ld->ops_lock); | 119 | mutex_lock(&ld->ops_lock); |
118 | if (ld->ops && ld->ops->set_power) { | 120 | if (ld->ops && ld->ops->set_power) { |
119 | pr_debug("lcd: set power to %lu\n", power); | 121 | pr_debug("set power to %lu\n", power); |
120 | ld->ops->set_power(ld, power); | 122 | ld->ops->set_power(ld, power); |
121 | rc = count; | 123 | rc = count; |
122 | } | 124 | } |
@@ -152,7 +154,7 @@ static ssize_t lcd_store_contrast(struct device *dev, | |||
152 | 154 | ||
153 | mutex_lock(&ld->ops_lock); | 155 | mutex_lock(&ld->ops_lock); |
154 | if (ld->ops && ld->ops->set_contrast) { | 156 | if (ld->ops && ld->ops->set_contrast) { |
155 | pr_debug("lcd: set contrast to %lu\n", contrast); | 157 | pr_debug("set contrast to %lu\n", contrast); |
156 | ld->ops->set_contrast(ld, contrast); | 158 | ld->ops->set_contrast(ld, contrast); |
157 | rc = count; | 159 | rc = count; |
158 | } | 160 | } |
@@ -263,8 +265,8 @@ static int __init lcd_class_init(void) | |||
263 | { | 265 | { |
264 | lcd_class = class_create(THIS_MODULE, "lcd"); | 266 | lcd_class = class_create(THIS_MODULE, "lcd"); |
265 | if (IS_ERR(lcd_class)) { | 267 | if (IS_ERR(lcd_class)) { |
266 | printk(KERN_WARNING "Unable to create backlight class; errno = %ld\n", | 268 | pr_warn("Unable to create backlight class; errno = %ld\n", |
267 | PTR_ERR(lcd_class)); | 269 | PTR_ERR(lcd_class)); |
268 | return PTR_ERR(lcd_class); | 270 | return PTR_ERR(lcd_class); |
269 | } | 271 | } |
270 | 272 | ||