Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 766a8a6d authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c48b1565
Loading
Loading
Loading
Loading
+20 −23
Original line number Diff line number Diff line
@@ -299,8 +299,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
					  "No critical threshold\n"));
		} else if (tmp <= 2732) {
			printk(KERN_WARNING FW_BUG "Invalid critical threshold "
			       "(%llu)\n", tmp);
			pr_warn(FW_BUG "Invalid critical threshold (%llu)\n",
				tmp);
			tz->trips.critical.flags.valid = 0;
		} else {
			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
				 */
				if (crt_k > tz->trips.critical.temperature)
					printk(KERN_WARNING PREFIX
						"Critical threshold %d C\n", crt);
					pr_warn(PREFIX "Critical threshold %d C\n",
						crt);
				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",
							NULL, &devices);
		if (ACPI_FAILURE(status)) {
			printk(KERN_WARNING PREFIX
				"Invalid passive threshold\n");
			pr_warn(PREFIX "Invalid passive threshold\n");
			tz->trips.passive.flags.valid = 0;
		}
		else
@@ -453,8 +452,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
			status = acpi_evaluate_reference(tz->device->handle,
						name, NULL, &devices);
			if (ACPI_FAILURE(status)) {
				printk(KERN_WARNING PREFIX
					"Invalid active%d threshold\n", i);
				pr_warn(PREFIX "Invalid active%d threshold\n",
					i);
				tz->trips.active[i].flags.valid = 0;
			}
			else
@@ -505,7 +504,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
		valid |= tz->trips.active[i].flags.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 0;
@@ -923,8 +922,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
				  acpi_bus_private_data_handler,
				  tz->thermal_zone);
	if (ACPI_FAILURE(status)) {
		printk(KERN_ERR PREFIX
				"Error attaching device data\n");
		pr_err(PREFIX "Error attaching device data\n");
		return -ENODEV;
	}

@@ -1094,9 +1092,8 @@ static int acpi_thermal_add(struct acpi_device *device)
	if (result)
		goto free_memory;

	printk(KERN_INFO PREFIX "%s [%s] (%ld C)\n",
	       acpi_device_name(device), acpi_device_bid(device),
	       KELVIN_TO_CELSIUS(tz->temperature));
	pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),
		acpi_device_bid(device), KELVIN_TO_CELSIUS(tz->temperature));
	goto end;

free_memory:
@@ -1159,7 +1156,7 @@ static int acpi_thermal_resume(struct device *dev)
static int thermal_act(const struct dmi_system_id *d) {

	if (act == 0) {
		printk(KERN_NOTICE "ACPI: %s detected: "
		pr_notice(PREFIX "%s detected: "
			  "disabling all active thermal trip points\n", d->ident);
		act = -1;
	}
@@ -1167,7 +1164,7 @@ static int thermal_act(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);
	nocrt = 1;
	return 0;
@@ -1175,7 +1172,7 @@ static int thermal_nocrt(const struct dmi_system_id *d) {
static int thermal_tzp(const struct dmi_system_id *d) {

	if (tzp == 0) {
		printk(KERN_NOTICE "ACPI: %s detected: "
		pr_notice(PREFIX "%s detected: "
			  "enabling thermal zone polling\n", d->ident);
		tzp = 300;	/* 300 dS = 30 Seconds */
	}
@@ -1184,7 +1181,7 @@ static int thermal_tzp(const struct dmi_system_id *d) {
static int thermal_psv(const struct dmi_system_id *d) {

	if (psv == 0) {
		printk(KERN_NOTICE "ACPI: %s detected: "
		pr_notice(PREFIX "%s detected: "
			  "disabling all passive thermal trip points\n", d->ident);
		psv = -1;
	}
@@ -1238,7 +1235,7 @@ static int __init acpi_thermal_init(void)
	dmi_check_system(thermal_dmi_table);

	if (off) {
		printk(KERN_NOTICE "ACPI: thermal control disabled\n");
		pr_notice(PREFIX "thermal control disabled\n");
		return -ENODEV;
	}