Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280586
b: refs/heads/master
c: a01a684
h: refs/heads/master
v: v3
  • Loading branch information
Frans Meulenbroeks authored and Guenter Roeck committed Jan 5, 2012
1 parent 5ab0092 commit 2642987
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: 66b3b1f757f5cfccedab9f39e7ef176342060735
refs/heads/master: a01a68472cb6bf9de31e1980399dd09baeab0d38
5 changes: 2 additions & 3 deletions trunk/drivers/hwmon/lm75.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
lm75.h - Part of lm_sensors, Linux kernel modules for hardware
monitoring
monitoring
Copyright (c) 2003 Mark M. Hoffman <mhoffman@lightlink.com>
This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -37,7 +37,7 @@
static inline u16 LM75_TEMP_TO_REG(long temp)
{
int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
ntemp += (ntemp<0 ? -250 : 250);
ntemp += (ntemp < 0 ? -250 : 250);
return (u16)((ntemp / 500) << 7);
}

Expand All @@ -47,4 +47,3 @@ static inline int LM75_TEMP_FROM_REG(u16 reg)
guarantee arithmetic shift and preserve the sign */
return ((s16)reg / 128) * 500;
}

0 comments on commit 2642987

Please sign in to comment.