Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (w83627ehf) Fix negative 8-bit temperature values

+3 -2
+3 -2
drivers/hwmon/w83627ehf.c
··· 390 390 { 391 391 if (is_word_sized(reg)) 392 392 return LM75_TEMP_FROM_REG(regval); 393 - return regval * 1000; 393 + return ((s8)regval) * 1000; 394 394 } 395 395 396 396 static inline u16 ··· 398 398 { 399 399 if (is_word_sized(reg)) 400 400 return LM75_TEMP_TO_REG(temp); 401 - return DIV_ROUND_CLOSEST(SENSORS_LIMIT(temp, -127000, 128000), 1000); 401 + return (s8)DIV_ROUND_CLOSEST(SENSORS_LIMIT(temp, -127000, 128000), 402 + 1000); 402 403 } 403 404 404 405 /* Some of analog inputs have internal scaling (2x), 8mV is ADC LSB */