aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-03-21 15:55:02 -0400
committerLen Brown <len.brown@intel.com>2012-03-22 01:04:40 -0400
commitc5a01dd52dc4903772f464ea580895ccc36e911d (patch)
tree3fc9e6d1854d58f190d2f77a24b03c814ea3fdf9 /drivers/thermal
parentcaca8b803520b0694423e2ac0ee3d58650b04a12 (diff)
thermal_sys: convert printks to pr_<level>
Use the current logging style. Remove PREFIX, add pr_fmt, convert the printks. All dmesg output now prefixed with "thermal_sys: ". Signed-off-by: Joe Perches <joe@perches.com> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_sys.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index db5d8f882668..fab970d9e3e1 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -23,6 +23,8 @@
23 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 */ 24 */
25 25
26#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
27
26#include <linux/module.h> 28#include <linux/module.h>
27#include <linux/device.h> 29#include <linux/device.h>
28#include <linux/err.h> 30#include <linux/err.h>
@@ -39,8 +41,6 @@ MODULE_AUTHOR("Zhang Rui");
39MODULE_DESCRIPTION("Generic thermal management sysfs support"); 41MODULE_DESCRIPTION("Generic thermal management sysfs support");
40MODULE_LICENSE("GPL"); 42MODULE_LICENSE("GPL");
41 43
42#define PREFIX "Thermal: "
43
44struct thermal_cooling_device_instance { 44struct thermal_cooling_device_instance {
45 int id; 45 int id;
46 char name[THERMAL_NAME_LENGTH]; 46 char name[THERMAL_NAME_LENGTH];
@@ -1023,8 +1023,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
1023 1023
1024 if (tz->ops->get_temp(tz, &temp)) { 1024 if (tz->ops->get_temp(tz, &temp)) {
1025 /* get_temp failed - retry it later */ 1025 /* get_temp failed - retry it later */
1026 printk(KERN_WARNING PREFIX "failed to read out thermal zone " 1026 pr_warn("failed to read out thermal zone %d\n", tz->id);
1027 "%d\n", tz->id);
1028 goto leave; 1027 goto leave;
1029 } 1028 }
1030 1029
@@ -1039,9 +1038,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
1039 ret = tz->ops->notify(tz, count, 1038 ret = tz->ops->notify(tz, count,
1040 trip_type); 1039 trip_type);
1041 if (!ret) { 1040 if (!ret) {
1042 printk(KERN_EMERG 1041 pr_emerg("Critical temperature reached (%ld C), shutting down\n",
1043 "Critical temperature reached (%ld C), shutting down.\n", 1042 temp/1000);
1044 temp/1000);
1045 orderly_poweroff(true); 1043 orderly_poweroff(true);
1046 } 1044 }
1047 } 1045 }
@@ -1345,7 +1343,7 @@ int thermal_generate_netlink_event(u32 orig, enum events event)
1345 1343
1346 result = genlmsg_multicast(skb, 0, thermal_event_mcgrp.id, GFP_ATOMIC); 1344 result = genlmsg_multicast(skb, 0, thermal_event_mcgrp.id, GFP_ATOMIC);
1347 if (result) 1345 if (result)
1348 printk(KERN_INFO "failed to send netlink event:%d", result); 1346 pr_info("failed to send netlink event:%d\n", result);
1349 1347
1350 return result; 1348 return result;
1351} 1349}