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>
This commit is contained in:
Родитель
caca8b8035
Коммит
c5a01dd52d
|
@ -23,6 +23,8 @@
|
||||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
|
@ -39,8 +41,6 @@ MODULE_AUTHOR("Zhang Rui");
|
||||||
MODULE_DESCRIPTION("Generic thermal management sysfs support");
|
MODULE_DESCRIPTION("Generic thermal management sysfs support");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
#define PREFIX "Thermal: "
|
|
||||||
|
|
||||||
struct thermal_cooling_device_instance {
|
struct thermal_cooling_device_instance {
|
||||||
int id;
|
int id;
|
||||||
char name[THERMAL_NAME_LENGTH];
|
char name[THERMAL_NAME_LENGTH];
|
||||||
|
@ -1023,8 +1023,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
|
||||||
|
|
||||||
if (tz->ops->get_temp(tz, &temp)) {
|
if (tz->ops->get_temp(tz, &temp)) {
|
||||||
/* get_temp failed - retry it later */
|
/* get_temp failed - retry it later */
|
||||||
printk(KERN_WARNING PREFIX "failed to read out thermal zone "
|
pr_warn("failed to read out thermal zone %d\n", tz->id);
|
||||||
"%d\n", tz->id);
|
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1039,8 +1038,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
|
||||||
ret = tz->ops->notify(tz, count,
|
ret = tz->ops->notify(tz, count,
|
||||||
trip_type);
|
trip_type);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printk(KERN_EMERG
|
pr_emerg("Critical temperature reached (%ld C), shutting down\n",
|
||||||
"Critical temperature reached (%ld C), shutting down.\n",
|
|
||||||
temp/1000);
|
temp/1000);
|
||||||
orderly_poweroff(true);
|
orderly_poweroff(true);
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1343,7 @@ int thermal_generate_netlink_event(u32 orig, enum events event)
|
||||||
|
|
||||||
result = genlmsg_multicast(skb, 0, thermal_event_mcgrp.id, GFP_ATOMIC);
|
result = genlmsg_multicast(skb, 0, thermal_event_mcgrp.id, GFP_ATOMIC);
|
||||||
if (result)
|
if (result)
|
||||||
printk(KERN_INFO "failed to send netlink event:%d", result);
|
pr_info("failed to send netlink event:%d\n", result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче