[PATCH 13/32] drivers/hwmon/hwmon.c: Use pr_fmt and pr_<level>

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joe Perches
Date: Tuesday, October 19, 2010 - 11:51 pm

Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_<level>
Coalesced any long formats
Removed prefixes from formats

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/hwmon/hwmon.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 29ea675..a61e781 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -10,6 +10,8 @@
     the Free Software Foundation; version 2 of the License.
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/err.h>
@@ -119,7 +121,7 @@ static int __init hwmon_init(void)
 
 	hwmon_class = class_create(THIS_MODULE, "hwmon");
 	if (IS_ERR(hwmon_class)) {
-		printk(KERN_ERR "hwmon.c: couldn't create sysfs class\n");
+		pr_err("couldn't create sysfs class\n");
 		return PTR_ERR(hwmon_class);
 	}
 	return 0;
-- 
1.7.3.1.g432b3.dirty

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Joe Perches, (Tue Oct 19, 4:13 pm)
Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Henrik Rydberg, (Tue Oct 19, 11:04 pm)
[PATCH 13/32] drivers/hwmon/hwmon.c: Use pr_fmt and pr_<level>, Joe Perches, (Tue Oct 19, 11:51 pm)
Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Guenter Roeck, (Wed Oct 20, 10:18 am)
Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Guenter Roeck, (Wed Oct 20, 10:48 am)
Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Guenter Roeck, (Wed Oct 20, 11:03 am)
Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Guenter Roeck, (Wed Oct 20, 11:35 am)
Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_&lt;level&gt;, Davidlohr Bueso, (Wed Oct 20, 12:19 pm)