Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186417
b: refs/heads/master
c: a44908d
h: refs/heads/master
i:
  186415: 6c4a10d
v: v3
  • Loading branch information
Jean Delvare committed Mar 5, 2010
1 parent 6a53200 commit 6fb6bb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 8d59582a867470a3e0c3eced4a01625ae8dc546b
refs/heads/master: a44908d742a577fb5ccb9a8c082326d4cea234c2
6 changes: 4 additions & 2 deletions trunk/drivers/hwmon/tmp421.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,16 @@ struct tmp421_data {

static int temp_from_s16(s16 reg)
{
int temp = reg;
/* Mask out status bits */
int temp = reg & ~0xf;

return (temp * 1000 + 128) / 256;
}

static int temp_from_u16(u16 reg)
{
int temp = reg;
/* Mask out status bits */
int temp = reg & ~0xf;

/* Add offset for extended temperature range. */
temp -= 64 * 256;
Expand Down

0 comments on commit 6fb6bb0

Please sign in to comment.