Commit 31e6432b authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

backlight: cr_bllcd: use pr_err()/pr_info() instead of printk()

Use pr_err()/pr_info() instead of printk() to allow dynamic debugging.
The pr_fmt prefix for pr_ macros is used.  Also fix checkpatch warnings as
below:

WARNING: printk() should include KERN_ facility level
WARNING: Prefer pr_err(... to printk(KERN_ERR, ...

[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7b12c1b9
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
* Alan Hourihane <alanh-at-tungstengraphics-dot-com> * Alan Hourihane <alanh-at-tungstengraphics-dot-com>
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -180,14 +182,13 @@ static int cr_backlight_probe(struct platform_device *pdev) ...@@ -180,14 +182,13 @@ static int cr_backlight_probe(struct platform_device *pdev)
lpc_dev = pci_get_device(PCI_VENDOR_ID_INTEL, lpc_dev = pci_get_device(PCI_VENDOR_ID_INTEL,
CRVML_DEVICE_LPC, NULL); CRVML_DEVICE_LPC, NULL);
if (!lpc_dev) { if (!lpc_dev) {
printk("INTEL CARILLO RANCH LPC not found.\n"); pr_err("INTEL CARILLO RANCH LPC not found.\n");
return -ENODEV; return -ENODEV;
} }
pci_read_config_byte(lpc_dev, CRVML_REG_GPIOEN, &dev_en); pci_read_config_byte(lpc_dev, CRVML_REG_GPIOEN, &dev_en);
if (!(dev_en & CRVML_GPIOEN_BIT)) { if (!(dev_en & CRVML_GPIOEN_BIT)) {
printk(KERN_ERR pr_err("Carillo Ranch GPIO device was not enabled.\n");
"Carillo Ranch GPIO device was not enabled.\n");
pci_dev_put(lpc_dev); pci_dev_put(lpc_dev);
return -ENODEV; return -ENODEV;
} }
...@@ -270,7 +271,7 @@ static int __init cr_backlight_init(void) ...@@ -270,7 +271,7 @@ static int __init cr_backlight_init(void)
return PTR_ERR(crp); return PTR_ERR(crp);
} }
printk("Carillo Ranch Backlight Driver Initialized.\n"); pr_info("Carillo Ranch Backlight Driver Initialized.\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment