summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa/it.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-08-23 18:06:02 +0000
committermillert <millert@openbsd.org>2004-08-23 18:06:02 +0000
commit5c427db08ec7da25154144d7f6d1e3c23d5a4737 (patch)
treefa284bd3b3b2a29e82c4f9b46d5433b3ecac3fe4 /sys/dev/isa/it.c
parentDo %s replacement for LESSOPEN and LESSCLOSE ourselves instead (diff)
downloadwireguard-openbsd-5c427db08ec7da25154144d7f6d1e3c23d5a4737.tar.xz
wireguard-openbsd-5c427db08ec7da25154144d7f6d1e3c23d5a4737.zip
The IT87 chip has 3 Fan sensors. Fix the loop invariant and add
a missing break statement. From Stephan Leemburg. OK deraadt@
Diffstat (limited to 'sys/dev/isa/it.c')
-rw-r--r--sys/dev/isa/it.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/isa/it.c b/sys/dev/isa/it.c
index 2926f461e6d..bcd6ed66df2 100644
--- a/sys/dev/isa/it.c
+++ b/sys/dev/isa/it.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: it.c,v 1.9 2004/08/17 21:59:15 mickey Exp $ */
+/* $OpenBSD: it.c,v 1.10 2004/08/23 18:06:02 millert Exp $ */
/*
* Copyright (c) 2003 Julien Bordet <zejames@greyhats.org>
@@ -301,14 +301,14 @@ it_generic_fanrpm(struct it_softc *sc, struct sensor *sensors)
{
int i, sdata, divisor;
- for (i = 0; i < 2; i++) {
+ for (i = 0; i < 3; i++) {
sdata = it_readreg(sc, ITD_SENSORFANBASE + i);
switch (i) {
case 2:
divisor = 2;
+ break;
case 1:
- divisor = (it_readreg(sc,
- ITD_FAN) >> 3) & 0x7;
+ divisor = (it_readreg(sc, ITD_FAN) >> 3) & 0x7;
break;
default:
divisor = it_readreg(sc, ITD_FAN) & 0x7;