Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350551
b: refs/heads/master
c: 91bba68
h: refs/heads/master
i:
  350549: d208549
  350547: 876f727
  350543: 7d31446
v: v3
  • Loading branch information
Guenter Roeck committed Feb 6, 2013
1 parent 6306fc3 commit 968d9d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: b06367070de3d9f50e4f8f82b92e77ba9a8ebf8f
refs/heads/master: 91bba688016be0ba87ecb9d80d6490c2ebc63b0d
7 changes: 3 additions & 4 deletions trunk/drivers/hwmon/lm73.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4c,

#define LM73_ID 0x9001 /* 0x0190, byte-swapped */
#define DRVNAME "lm73"
#define LM73_TEMP_MIN (-40)
#define LM73_TEMP_MAX 150
#define LM73_TEMP_MIN (-256000 / 250)
#define LM73_TEMP_MAX (255750 / 250)

/*-----------------------------------------------------------------------*/

Expand All @@ -56,8 +56,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,
return status;

/* Write value */
value = (short) clamp_val(temp / 250, LM73_TEMP_MIN * 4,
LM73_TEMP_MAX * 4) << 5;
value = clamp_val(temp / 250, LM73_TEMP_MIN, LM73_TEMP_MAX) << 5;
err = i2c_smbus_write_word_swapped(client, attr->index, value);
return (err < 0) ? err : count;
}
Expand Down

0 comments on commit 968d9d3

Please sign in to comment.