From 3f5c8939fd3c33d5127f575d6854ee129bb5d9de Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Sat, 20 Nov 1999 19:27:10 +0000 Subject: [PATCH] fan div error in adm driver correction Strange, I thought I had committed this one a few days ago... git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@635 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/adm9240.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/chips/adm9240.c b/kernel/chips/adm9240.c index 6ea38e0b..ec0ba589 100644 --- a/kernel/chips/adm9240.c +++ b/kernel/chips/adm9240.c @@ -710,11 +710,11 @@ void adm9240_fan_div(struct i2c_client *client, int operation, int ctl_name, old = adm9240_read_value(client,ADM9240_REG_VID_FAN_DIV); if (*nrels_mag >= 2) { data->fan_div[1] = DIV_TO_REG(results[1]); - old = (old & 0xcf) | (data->fan_div[1] << 6); + old = (old & 0x3f) | (data->fan_div[1] << 6); } if (*nrels_mag >= 1) { data->fan_div[0] = DIV_TO_REG(results[0]); - old = (old & 0x3f) | (data->fan_div[0] << 4); + old = (old & 0xcf) | (data->fan_div[0] << 4); adm9240_write_value(client,ADM9240_REG_VID_FAN_DIV,old); } }