hwmon: (lm78) Fix overflow problems seen when writing large temperature limits
On platforms with sizeof(int) < sizeof(long), writing a temperature limit larger than MAXINT will result in unpredictable limit values written to the chip. Avoid auto-conversion from long to int to fix the problem. Cc: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Reviewed-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Showing
想要评论请 注册 或 登录