Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90205c6cbb8fd9880bf798903a99f5b8903455e2 Commit: 90205c6cbb8fd9880bf798903a99f5b8903455e2 Parent: 3faa1ffb4f4be7d10715f4b003ff7b27d14eae26 Author: Jean Delvare <[EMAIL PROTECTED]> AuthorDate: Sat Jun 23 14:58:22 2007 +0200 Committer: Mark M. Hoffman <[EMAIL PROTECTED]> CommitDate: Thu Jul 19 14:22:16 2007 -0400
hwmon/smsc47b397: Don't report missing fans as spinning at 82 RPM Also protects ourselves against a possible division by zero. Signed-off-by: Jean Delvare <[EMAIL PROTECTED]> Signed-off-by: Mark M. Hoffman <[EMAIL PROTECTED]> --- drivers/hwmon/smsc47b397.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c index 3b65b0e..45266b3 100644 --- a/drivers/hwmon/smsc47b397.c +++ b/drivers/hwmon/smsc47b397.c @@ -174,6 +174,8 @@ static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, show_temp, NULL, 3); REG: count of 90kHz pulses / revolution */ static int fan_from_reg(u16 reg) { + if (reg == 0 || reg == 0xffff) + return 0; return 90000 * 60 / reg; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html