From 1ac081f81802ed4ef8ea3fe4f84879ad133412a0 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 28 Oct 2010 20:31:47 +0200 Subject: [PATCH] --- yaml --- r: 220495 b: refs/heads/master c: 7eb8d508b5cfabbb147670ee063438469d94c465 h: refs/heads/master i: 220493: f5ac851512e048aadbb77a37f9ae310914715f72 220491: 478ffa6bee1780efc9108734c54cb6982da8935a 220487: bf5e3b60ea2d5337f1a626fef453da08410cf458 220479: 6fe11648f224b93cb0547a8694aa790d3d6ce512 v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/w83795.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index c85efa91c622..364fce0c51bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a654b9d4e7152b06557e2f22bcf0a245bc88bc98 +refs/heads/master: 7eb8d508b5cfabbb147670ee063438469d94c465 diff --git a/trunk/drivers/hwmon/w83795.c b/trunk/drivers/hwmon/w83795.c index 71b7a254beeb..ec8a1d1f7d79 100644 --- a/trunk/drivers/hwmon/w83795.c +++ b/trunk/drivers/hwmon/w83795.c @@ -183,7 +183,7 @@ static const u8 IN_LSB_SHIFT_IDX[][2] = { #define W83795_REG_FAN_MIN_HL(index) (0xB6 + (index)) #define W83795_REG_FAN_MIN_LSB(index) (0xC4 + (index) / 2) #define W83795_REG_FAN_MIN_LSB_SHIFT(index) \ - (((index) % 1) ? 4 : 0) + (((index) & 1) ? 4 : 0) #define W83795_REG_VID_CTRL 0x6A @@ -670,7 +670,7 @@ store_fan_min(struct device *dev, struct device_attribute *attr, data->fan_min[index] = val; w83795_write(client, W83795_REG_FAN_MIN_HL(index), (val >> 4) & 0xff); val &= 0x0f; - if (index % 1) { + if (index & 1) { val <<= 4; val |= w83795_read(client, W83795_REG_FAN_MIN_LSB(index)) & 0x0f; @@ -823,7 +823,7 @@ show_temp_src(struct device *dev, struct device_attribute *attr, char *buf) u8 val = index / 2; u8 tmp = data->temp_src[val]; - if (index % 1) + if (index & 1) val = 4; else val = 0; @@ -850,7 +850,7 @@ store_temp_src(struct device *dev, struct device_attribute *attr, tmp = SENSORS_LIMIT(tmp, 0, 15); mutex_lock(&data->update_lock); - if (index % 1) { + if (index & 1) { tmp <<= 4; data->temp_src[val] &= 0x0f; } else {