Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220486
b: refs/heads/master
c: 6c82b2f
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 28, 2010
1 parent 04bc983 commit ee930f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71caf46fbf39207a324a16ddb6d8ef37c05777b9
refs/heads/master: 6c82b2f3fb31e43a9b898769afd2151ca64986a4
10 changes: 5 additions & 5 deletions trunk/drivers/hwmon/w83795.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static inline u16 in_to_reg(u8 index, u16 val)

static inline unsigned long fan_from_reg(u16 val)
{
if ((val >= 0xff0) || (val == 0))
if ((val == 0xfff) || (val == 0))
return 0;
return 1350000UL / val;
}
Expand Down Expand Up @@ -456,7 +456,7 @@ static struct w83795_data *w83795_update_device(struct device *dev)
continue;
data->fan[i] = w83795_read(client, W83795_REG_FAN(i)) << 4;
data->fan[i] |=
(w83795_read(client, W83795_REG_VRLSB >> 4)) & 0x0F;
(w83795_read(client, W83795_REG_VRLSB) >> 4) & 0x0F;
}

/* Update temperature */
Expand Down Expand Up @@ -1940,11 +1940,11 @@ static int w83795_probe(struct i2c_client *client,
data->fan_min[i] =
w83795_read(client, W83795_REG_FAN_MIN_HL(i)) << 4;
data->fan_min[i] |=
(w83795_read(client, W83795_REG_FAN_MIN_LSB(i) >>
W83795_REG_FAN_MIN_LSB_SHIFT(i))) & 0x0F;
(w83795_read(client, W83795_REG_FAN_MIN_LSB(i)) >>
W83795_REG_FAN_MIN_LSB_SHIFT(i)) & 0x0F;
data->fan[i] = w83795_read(client, W83795_REG_FAN(i)) << 4;
data->fan[i] |=
(w83795_read(client, W83795_REG_VRLSB >> 4)) & 0x0F;
(w83795_read(client, W83795_REG_VRLSB) >> 4) & 0x0F;
}

/* temperature and limits */
Expand Down

0 comments on commit ee930f1

Please sign in to comment.