summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-08-23 18:06:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-08-23 18:06:03 +0000
commit97acbb94f75419a68fdd1b2bb444f8a5f8ce7cfb (patch)
treefbad78085833364877d044e46519e30ec26269a6 /sys/dev
parent9c9d2339d1028d158c66fb7b82749108af808852 (diff)
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')
-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;