From 1653a43b851a230d7263c773725f848b89eb4386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 22 May 2009 10:59:10 +0000 Subject: [PATCH] --- yaml --- r: 149662 b: refs/heads/master c: 0512a9a8e277a9de2820211eef964473b714ae65 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/macintosh/therm_adt746x.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d9e8de825ad7..59ee796f039d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a85c8e17587e81e1c82f6f341a81e4c778fa65f6 +refs/heads/master: 0512a9a8e277a9de2820211eef964473b714ae65 diff --git a/trunk/drivers/macintosh/therm_adt746x.c b/trunk/drivers/macintosh/therm_adt746x.c index c0621d50c8a0..0ddf9044948a 100644 --- a/trunk/drivers/macintosh/therm_adt746x.c +++ b/trunk/drivers/macintosh/therm_adt746x.c @@ -37,6 +37,7 @@ #define CONFIG_REG 0x40 #define MANUAL_MASK 0xe0 #define AUTO_MASK 0x20 +#define INVERT_MASK 0x10 static u8 TEMP_REG[3] = {0x26, 0x25, 0x27}; /* local, sensor1, sensor2 */ static u8 LIMIT_REG[3] = {0x6b, 0x6a, 0x6c}; /* local, sensor1, sensor2 */ @@ -229,7 +230,8 @@ static void write_fan_speed(struct thermostat *th, int speed, int fan) if (speed >= 0) { manual = read_reg(th, MANUAL_MODE[fan]); - write_reg(th, MANUAL_MODE[fan], manual|MANUAL_MASK); + write_reg(th, MANUAL_MODE[fan], + (manual|MANUAL_MASK) & (~INVERT_MASK)); write_reg(th, FAN_SPD_SET[fan], speed); } else { /* back to automatic */