summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/f71805f.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-10 20:12:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-10 20:13:53 +0100
commit7483948fdd31a8642ef0288aab6f368b98d53c29 (patch)
tree031020a5553701d2aae8dddb0fa509aa65854eb1 /drivers/hwmon/f71805f.c
parentUSB: serial: use dev_err_console in custom write paths (diff)
parentMerge tag 'usb-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/greg... (diff)
downloadlinux-7483948fdd31a8642ef0288aab6f368b98d53c29.tar.xz
linux-7483948fdd31a8642ef0288aab6f368b98d53c29.zip
Merge tag 'usb-3.3-rc3' into usb-next
This is done to resolve a merge conflict with: drivers/usb/class/cdc-wdm.c and to better handle future patches for this driver as it is under active development at the moment. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon/f71805f.c')
-rw-r--r--drivers/hwmon/f71805f.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c
index 92f949767ece..6dbfd3e516e4 100644
--- a/drivers/hwmon/f71805f.c
+++ b/drivers/hwmon/f71805f.c
@@ -283,11 +283,11 @@ static inline long temp_from_reg(u8 reg)
static inline u8 temp_to_reg(long val)
{
- if (val < 0)
- val = 0;
- else if (val > 1000 * 0xff)
- val = 0xff;
- return ((val + 500) / 1000);
+ if (val <= 0)
+ return 0;
+ if (val >= 1000 * 0xff)
+ return 0xff;
+ return (val + 500) / 1000;
}
/*