diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-09-13 11:15:46 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-30 14:30:18 -0400 |
commit | 766a8a6dd89268107df1f6783f6a6338efcbf07e (patch) | |
tree | deaeb1477c1d2d515dbc078d7167206793335a65 /drivers/acpi/thermal.c | |
parent | c48b156517348a0130e9e6edbeba95f9b4e50d65 (diff) |
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>
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 6a0329340b42..e600b5dbfcb6 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -299,8 +299,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
299 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 299 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
300 | "No critical threshold\n")); | 300 | "No critical threshold\n")); |
301 | } else if (tmp <= 2732) { | 301 | } else if (tmp <= 2732) { |
302 | printk(KERN_WARNING FW_BUG "Invalid critical threshold " | 302 | pr_warn(FW_BUG "Invalid critical threshold (%llu)\n", |
303 | "(%llu)\n", tmp); | 303 | tmp); |
304 | tz->trips.critical.flags.valid = 0; | 304 | tz->trips.critical.flags.valid = 0; |
305 | } else { | 305 | } else { |
306 | tz->trips.critical.flags.valid = 1; | 306 | tz->trips.critical.flags.valid = 1; |
@@ -317,8 +317,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
317 | * Allow override critical threshold | 317 | * Allow override critical threshold |
318 | */ | 318 | */ |
319 | if (crt_k > tz->trips.critical.temperature) | 319 | if (crt_k > tz->trips.critical.temperature) |
320 | printk(KERN_WARNING PREFIX | 320 | pr_warn(PREFIX "Critical threshold %d C\n", |
321 | "Critical threshold %d C\n", crt); | 321 | crt); |
322 | tz->trips.critical.temperature = crt_k; | 322 | tz->trips.critical.temperature = crt_k; |
323 | } | 323 | } |
324 | } | 324 | } |
@@ -390,8 +390,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
390 | status = acpi_evaluate_reference(tz->device->handle, "_PSL", | 390 | status = acpi_evaluate_reference(tz->device->handle, "_PSL", |
391 | NULL, &devices); | 391 | NULL, &devices); |
392 | if (ACPI_FAILURE(status)) { | 392 | if (ACPI_FAILURE(status)) { |
393 | printk(KERN_WARNING PREFIX | 393 | pr_warn(PREFIX "Invalid passive threshold\n"); |
394 | "Invalid passive threshold\n"); | ||
395 | tz->trips.passive.flags.valid = 0; | 394 | tz->trips.passive.flags.valid = 0; |
396 | } | 395 | } |
397 | else | 396 | else |
@@ -453,8 +452,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
453 | status = acpi_evaluate_reference(tz->device->handle, | 452 | status = acpi_evaluate_reference(tz->device->handle, |
454 | name, NULL, &devices); | 453 | name, NULL, &devices); |
455 | if (ACPI_FAILURE(status)) { | 454 | if (ACPI_FAILURE(status)) { |
456 | printk(KERN_WARNING PREFIX | 455 | pr_warn(PREFIX "Invalid active%d threshold\n", |
457 | "Invalid active%d threshold\n", i); | 456 | i); |
458 | tz->trips.active[i].flags.valid = 0; | 457 | tz->trips.active[i].flags.valid = 0; |
459 | } | 458 | } |
460 | else | 459 | else |
@@ -505,7 +504,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) | |||
505 | valid |= tz->trips.active[i].flags.valid; | 504 | valid |= tz->trips.active[i].flags.valid; |
506 | 505 | ||
507 | if (!valid) { | 506 | if (!valid) { |
508 | printk(KERN_WARNING FW_BUG "No valid trip found\n"); | 507 | pr_warn(FW_BUG "No valid trip found\n"); |
509 | return -ENODEV; | 508 | return -ENODEV; |
510 | } | 509 | } |
511 | return 0; | 510 | return 0; |
@@ -923,8 +922,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) | |||
923 | acpi_bus_private_data_handler, | 922 | acpi_bus_private_data_handler, |
924 | tz->thermal_zone); | 923 | tz->thermal_zone); |
925 | if (ACPI_FAILURE(status)) { | 924 | if (ACPI_FAILURE(status)) { |
926 | printk(KERN_ERR PREFIX | 925 | pr_err(PREFIX "Error attaching device data\n"); |
927 | "Error attaching device data\n"); | ||
928 | return -ENODEV; | 926 | return -ENODEV; |
929 | } | 927 | } |
930 | 928 | ||
@@ -1094,9 +1092,8 @@ static int acpi_thermal_add(struct acpi_device *device) | |||
1094 | if (result) | 1092 | if (result) |
1095 | goto free_memory; | 1093 | goto free_memory; |
1096 | 1094 | ||
1097 | printk(KERN_INFO PREFIX "%s [%s] (%ld C)\n", | 1095 | pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device), |
1098 | acpi_device_name(device), acpi_device_bid(device), | 1096 | acpi_device_bid(device), KELVIN_TO_CELSIUS(tz->temperature)); |
1099 | KELVIN_TO_CELSIUS(tz->temperature)); | ||
1100 | goto end; | 1097 | goto end; |
1101 | 1098 | ||
1102 | free_memory: | 1099 | free_memory: |
@@ -1159,24 +1156,24 @@ static int acpi_thermal_resume(struct device *dev) | |||
1159 | static int thermal_act(const struct dmi_system_id *d) { | 1156 | static int thermal_act(const struct dmi_system_id *d) { |
1160 | 1157 | ||
1161 | if (act == 0) { | 1158 | if (act == 0) { |
1162 | printk(KERN_NOTICE "ACPI: %s detected: " | 1159 | pr_notice(PREFIX "%s detected: " |
1163 | "disabling all active thermal trip points\n", d->ident); | 1160 | "disabling all active thermal trip points\n", d->ident); |
1164 | act = -1; | 1161 | act = -1; |
1165 | } | 1162 | } |
1166 | return 0; | 1163 | return 0; |
1167 | } | 1164 | } |
1168 | static int thermal_nocrt(const struct dmi_system_id *d) { | 1165 | static int thermal_nocrt(const struct dmi_system_id *d) { |
1169 | 1166 | ||
1170 | printk(KERN_NOTICE "ACPI: %s detected: " | 1167 | pr_notice(PREFIX "%s detected: " |
1171 | "disabling all critical thermal trip point actions.\n", d->ident); | 1168 | "disabling all critical thermal trip point actions.\n", d->ident); |
1172 | nocrt = 1; | 1169 | nocrt = 1; |
1173 | return 0; | 1170 | return 0; |
1174 | } | 1171 | } |
1175 | static int thermal_tzp(const struct dmi_system_id *d) { | 1172 | static int thermal_tzp(const struct dmi_system_id *d) { |
1176 | 1173 | ||
1177 | if (tzp == 0) { | 1174 | if (tzp == 0) { |
1178 | printk(KERN_NOTICE "ACPI: %s detected: " | 1175 | pr_notice(PREFIX "%s detected: " |
1179 | "enabling thermal zone polling\n", d->ident); | 1176 | "enabling thermal zone polling\n", d->ident); |
1180 | tzp = 300; /* 300 dS = 30 Seconds */ | 1177 | tzp = 300; /* 300 dS = 30 Seconds */ |
1181 | } | 1178 | } |
1182 | return 0; | 1179 | return 0; |
@@ -1184,8 +1181,8 @@ static int thermal_tzp(const struct dmi_system_id *d) { | |||
1184 | static int thermal_psv(const struct dmi_system_id *d) { | 1181 | static int thermal_psv(const struct dmi_system_id *d) { |
1185 | 1182 | ||
1186 | if (psv == 0) { | 1183 | if (psv == 0) { |
1187 | printk(KERN_NOTICE "ACPI: %s detected: " | 1184 | pr_notice(PREFIX "%s detected: " |
1188 | "disabling all passive thermal trip points\n", d->ident); | 1185 | "disabling all passive thermal trip points\n", d->ident); |
1189 | psv = -1; | 1186 | psv = -1; |
1190 | } | 1187 | } |
1191 | return 0; | 1188 | return 0; |
@@ -1238,7 +1235,7 @@ static int __init acpi_thermal_init(void) | |||
1238 | dmi_check_system(thermal_dmi_table); | 1235 | dmi_check_system(thermal_dmi_table); |
1239 | 1236 | ||
1240 | if (off) { | 1237 | if (off) { |
1241 | printk(KERN_NOTICE "ACPI: thermal control disabled\n"); | 1238 | pr_notice(PREFIX "thermal control disabled\n"); |
1242 | return -ENODEV; | 1239 | return -ENODEV; |
1243 | } | 1240 | } |
1244 | 1241 | ||