From 359ec7322939a5327a1a5dd45a4a34c437f808d7 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Mon, 22 Apr 2013 13:03:39 +0800 Subject: [PATCH] debug patch to check acpi thermal_get_trend --- drivers/acpi/thermal.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 119920f..dba72c4 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -720,19 +720,25 @@ static int thermal_get_trend(struct thermal_zone_device *thermal, unsigned long trip_temp; int i; + printk("Rui: in acpi thermal_get_trend, trip %d\n", trip); if (thermal_get_trip_type(thermal, trip, &type)) return -EINVAL; + printk("Rui: trip type %d\n", type); if (type == THERMAL_TRIP_ACTIVE) { + printk("Rui: active trip point\n"); if (thermal_get_trip_temp(thermal, trip, &trip_temp)) return -EINVAL; - + printk("Rui: trip temp %d, current temp %d\n", trip_temp, tz->temperature); if (tz->temperature >= trip_temp) { + printk("Rui: trend raising\n"); *trend = THERMAL_TREND_RAISING; return 0; - } else + } else { + printk("Rui: fall back on default trend\n"); /* Fall back on default trend */ return -EINVAL; + } } /* -- 1.7.9.5