summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/backlight.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-05-30 02:07:16 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-30 03:22:29 +0400
commit35f961623cee5212d4ee0baa8c34b1766913b36b (patch)
treea68358ec16195a57273cd22595368b3b3850864b /drivers/video/backlight/backlight.c
parent71d7225cd4275e7fd7003dd6ec42320905eacc7d (diff)
downloadlinux-35f961623cee5212d4ee0baa8c34b1766913b36b.tar.xz
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/backlight.c')
-rw-r--r--drivers/video/backlight/backlight.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bf5b1ece7160..297db2fa91f5 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -5,6 +5,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
@@ -123,7 +125,7 @@ static ssize_t backlight_store_power(struct device *dev,
rc = -ENXIO;
mutex_lock(&bd->ops_lock);
if (bd->ops) {
- pr_debug("backlight: set power to %lu\n", power);
+ pr_debug("set power to %lu\n", power);
if (bd->props.power != power) {
bd->props.power = power;
backlight_update_status(bd);
@@ -161,8 +163,7 @@ static ssize_t backlight_store_brightness(struct device *dev,
if (brightness > bd->props.max_brightness)
rc = -EINVAL;
else {
- pr_debug("backlight: set brightness to %lu\n",
- brightness);
+ pr_debug("set brightness to %lu\n", brightness);
bd->props.brightness = brightness;
backlight_update_status(bd);
rc = count;
@@ -378,8 +379,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);
}