ACPI / thermal: convert printk(LEVEL...) to pr_<lvl>
Convert printks to pr_* format. Additionally re-use PREFIX constant instead of hardcoded strings. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
c48b156517
commit
766a8a6dd8
|
@ -299,8 +299,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||||
"No critical threshold\n"));
|
"No critical threshold\n"));
|
||||||
} else if (tmp <= 2732) {
|
} else if (tmp <= 2732) {
|
||||||
printk(KERN_WARNING FW_BUG "Invalid critical threshold "
|
pr_warn(FW_BUG "Invalid critical threshold (%llu)\n",
|
||||||
"(%llu)\n", tmp);
|
tmp);
|
||||||
tz->trips.critical.flags.valid = 0;
|
tz->trips.critical.flags.valid = 0;
|
||||||
} else {
|
} else {
|
||||||
tz->trips.critical.flags.valid = 1;
|
tz->trips.critical.flags.valid = 1;
|
||||||
|
@ -317,8 +317,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
* Allow override critical threshold
|
* Allow override critical threshold
|
||||||
*/
|
*/
|
||||||
if (crt_k > tz->trips.critical.temperature)
|
if (crt_k > tz->trips.critical.temperature)
|
||||||
printk(KERN_WARNING PREFIX
|
pr_warn(PREFIX "Critical threshold %d C\n",
|
||||||
"Critical threshold %d C\n", crt);
|
crt);
|
||||||
tz->trips.critical.temperature = crt_k;
|
tz->trips.critical.temperature = crt_k;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,8 +390,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
|
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
|
||||||
NULL, &devices);
|
NULL, &devices);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_WARNING PREFIX
|
pr_warn(PREFIX "Invalid passive threshold\n");
|
||||||
"Invalid passive threshold\n");
|
|
||||||
tz->trips.passive.flags.valid = 0;
|
tz->trips.passive.flags.valid = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -453,8 +452,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
status = acpi_evaluate_reference(tz->device->handle,
|
status = acpi_evaluate_reference(tz->device->handle,
|
||||||
name, NULL, &devices);
|
name, NULL, &devices);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_WARNING PREFIX
|
pr_warn(PREFIX "Invalid active%d threshold\n",
|
||||||
"Invalid active%d threshold\n", i);
|
i);
|
||||||
tz->trips.active[i].flags.valid = 0;
|
tz->trips.active[i].flags.valid = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -505,7 +504,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
|
||||||
valid |= tz->trips.active[i].flags.valid;
|
valid |= tz->trips.active[i].flags.valid;
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
printk(KERN_WARNING FW_BUG "No valid trip found\n");
|
pr_warn(FW_BUG "No valid trip found\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -923,8 +922,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
|
||||||
acpi_bus_private_data_handler,
|
acpi_bus_private_data_handler,
|
||||||
tz->thermal_zone);
|
tz->thermal_zone);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
printk(KERN_ERR PREFIX
|
pr_err(PREFIX "Error attaching device data\n");
|
||||||
"Error attaching device data\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,9 +1092,8 @@ static int acpi_thermal_add(struct acpi_device *device)
|
||||||
if (result)
|
if (result)
|
||||||
goto free_memory;
|
goto free_memory;
|
||||||
|
|
||||||
printk(KERN_INFO PREFIX "%s [%s] (%ld C)\n",
|
pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),
|
||||||
acpi_device_name(device), acpi_device_bid(device),
|
acpi_device_bid(device), KELVIN_TO_CELSIUS(tz->temperature));
|
||||||
KELVIN_TO_CELSIUS(tz->temperature));
|
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
free_memory:
|
free_memory:
|
||||||
|
@ -1159,24 +1156,24 @@ static int acpi_thermal_resume(struct device *dev)
|
||||||
static int thermal_act(const struct dmi_system_id *d) {
|
static int thermal_act(const struct dmi_system_id *d) {
|
||||||
|
|
||||||
if (act == 0) {
|
if (act == 0) {
|
||||||
printk(KERN_NOTICE "ACPI: %s detected: "
|
pr_notice(PREFIX "%s detected: "
|
||||||
"disabling all active thermal trip points\n", d->ident);
|
"disabling all active thermal trip points\n", d->ident);
|
||||||
act = -1;
|
act = -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static int thermal_nocrt(const struct dmi_system_id *d) {
|
static int thermal_nocrt(const struct dmi_system_id *d) {
|
||||||
|
|
||||||
printk(KERN_NOTICE "ACPI: %s detected: "
|
pr_notice(PREFIX "%s detected: "
|
||||||
"disabling all critical thermal trip point actions.\n", d->ident);
|
"disabling all critical thermal trip point actions.\n", d->ident);
|
||||||
nocrt = 1;
|
nocrt = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static int thermal_tzp(const struct dmi_system_id *d) {
|
static int thermal_tzp(const struct dmi_system_id *d) {
|
||||||
|
|
||||||
if (tzp == 0) {
|
if (tzp == 0) {
|
||||||
printk(KERN_NOTICE "ACPI: %s detected: "
|
pr_notice(PREFIX "%s detected: "
|
||||||
"enabling thermal zone polling\n", d->ident);
|
"enabling thermal zone polling\n", d->ident);
|
||||||
tzp = 300; /* 300 dS = 30 Seconds */
|
tzp = 300; /* 300 dS = 30 Seconds */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1184,8 +1181,8 @@ static int thermal_tzp(const struct dmi_system_id *d) {
|
||||||
static int thermal_psv(const struct dmi_system_id *d) {
|
static int thermal_psv(const struct dmi_system_id *d) {
|
||||||
|
|
||||||
if (psv == 0) {
|
if (psv == 0) {
|
||||||
printk(KERN_NOTICE "ACPI: %s detected: "
|
pr_notice(PREFIX "%s detected: "
|
||||||
"disabling all passive thermal trip points\n", d->ident);
|
"disabling all passive thermal trip points\n", d->ident);
|
||||||
psv = -1;
|
psv = -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1238,7 +1235,7 @@ static int __init acpi_thermal_init(void)
|
||||||
dmi_check_system(thermal_dmi_table);
|
dmi_check_system(thermal_dmi_table);
|
||||||
|
|
||||||
if (off) {
|
if (off) {
|
||||||
printk(KERN_NOTICE "ACPI: thermal control disabled\n");
|
pr_notice(PREFIX "thermal control disabled\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue