Skip to contentSkip to conversation

backlight: cr_bllcd.c: use pr_err/info 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 3/7 backlight: cr_bllcd.c: use pr_err/info instead of printk

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

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

Cc Richard Purdie <[email protected]>
---
 drivers/video/backlight/cr_bllcd.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/video/backlight/cr_bllcd.c +3 -4
index 22489eb..4c08381 100644
@@ -180,14 +180,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 +269,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;
 }
Signature · 1 line
1.7.1