From c100a5e0255777c783646791e98434f300a94c4c Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Thu, 21 Feb 2013 16:45:23 -0800 Subject: rtc: use dev_warn()/dev_dbg()/pr_err() instead of printk() Fix the checkpatch warning as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/class.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/rtc/class.c') diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 26388f18259..9b742d3ffb9 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -11,6 +11,8 @@ * published by the Free Software Foundation. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -261,7 +263,7 @@ static int __init rtc_init(void) { rtc_class = class_create(THIS_MODULE, "rtc"); if (IS_ERR(rtc_class)) { - printk(KERN_ERR "%s: couldn't create class\n", __FILE__); + pr_err("couldn't create class\n"); return PTR_ERR(rtc_class); } rtc_class->suspend = rtc_suspend; -- cgit v1.2.3-70-g09d2