Commit fbb7bf24052ebdcde8f78f9dfbe8f8713a7fce7d

ckolivas 2014-02-05T11:38:34

Clamp initial hfa fanspeed to min/max if passed as parameters.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/driver-hashfast.c b/driver-hashfast.c
index afd8f65..58a06fd 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -52,6 +52,10 @@ char *set_hfa_fan(char *arg)
 
 	opt_hfa_fan_min = val1;
 	opt_hfa_fan_max = val2;
+	if (opt_hfa_fan_min > opt_hfa_fan_default)
+		opt_hfa_fan_default = opt_hfa_fan_min;
+	if (opt_hfa_fan_max < opt_hfa_fan_default)
+		opt_hfa_fan_default = opt_hfa_fan_max;
 
 	return NULL;
 }