From: Jingoo Han Date: Tue, 29 May 2012 22:07:17 +0000 (-0700) Subject: backlight: cr_bllcd: use pr_err()/pr_info() instead of printk() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31e6432b3210e89a520fe17b9b29877780355b69;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Jingoo Han Cc: Richard Purdie Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c index 22489eb5f3e0..37bae801e23b 100644 --- a/drivers/video/backlight/cr_bllcd.c +++ b/drivers/video/backlight/cr_bllcd.c @@ -27,6 +27,8 @@ * Alan Hourihane */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -180,14 +182,13 @@ static int cr_backlight_probe(struct platform_device *pdev) lpc_dev = pci_get_device(PCI_VENDOR_ID_INTEL, CRVML_DEVICE_LPC, NULL); if (!lpc_dev) { - printk("INTEL CARILLO RANCH LPC not found.\n"); + pr_err("INTEL CARILLO RANCH LPC not found.\n"); return -ENODEV; } pci_read_config_byte(lpc_dev, CRVML_REG_GPIOEN, &dev_en); if (!(dev_en & CRVML_GPIOEN_BIT)) { - printk(KERN_ERR - "Carillo Ranch GPIO device was not enabled.\n"); + pr_err("Carillo Ranch GPIO device was not enabled.\n"); pci_dev_put(lpc_dev); return -ENODEV; } @@ -270,7 +271,7 @@ static int __init cr_backlight_init(void) return PTR_ERR(crp); } - printk("Carillo Ranch Backlight Driver Initialized.\n"); + pr_info("Carillo Ranch Backlight Driver Initialized.\n"); return 0; }