Commit 03f4f7e6a6abac3e29778276854c22b00eca5a2a

Con Kolivas 2012-02-22T14:26:29

We should be setting the value of fan_optimal, not its address.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/adl.c b/adl.c
index eef54bb..114ed3e 100644
--- a/adl.c
+++ b/adl.c
@@ -1019,7 +1019,7 @@ static void fan_autotune(int gpu, int temp, int fanpercent, bool __maybe_unused 
 	else if (newpercent < iMin)
 		newpercent = iMin;
 	if (newpercent != fanpercent) {
-		fan_optimal = false;
+		*fan_optimal = false;
 		applog(LOG_INFO, "Setting GPU %d fan percentage to %d", gpu, newpercent);
 		set_fanspeed(gpu, newpercent);
 	}