diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-01-17 22:01:49 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-01-17 22:01:49 +0000 |
commit | 5faac2ac3fb23189be66c76e16ecc5df9d131ad3 (patch) | |
tree | baabf99b4a8cddb1eab394022529e63ddb5ce91f /sys/dev/ic/lm78.c | |
parent | a80a7ee45a113c3994fff27db52888e104c81807 (diff) |
Support W83791SD as an lm(4) without sensors.
Diffstat (limited to 'sys/dev/ic/lm78.c')
-rw-r--r-- | sys/dev/ic/lm78.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/ic/lm78.c b/sys/dev/ic/lm78.c index 816a58216de..300549eb715 100644 --- a/sys/dev/ic/lm78.c +++ b/sys/dev/ic/lm78.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78.c,v 1.2 2006/01/15 22:03:17 kettenis Exp $ */ +/* $OpenBSD: lm78.c,v 1.3 2006/01/17 22:01:48 kettenis Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -315,6 +315,10 @@ lm_attach(struct lm_softc *sc) if (lm_chips[i].chip_match(sc)) break; + /* No point in doing anything if we don't have any sensors. */ + if (sc->numsensors == 0) + return; + if (sensor_task_register(sc, lm_refresh, 5)) { printf("%s: unable to register update task\n", sc->sc_dev.dv_xname); @@ -425,10 +429,12 @@ wb_match(struct lm_softc *sc) lm_setup_sensors(sc, w83783s_sensors); break; case WB_CHIPID_W83791D: - case WB_CHIPID_W83791D_2: printf(": W83791D\n"); lm_setup_sensors(sc, w83791d_sensors); break; + case WB_CHIPID_W83791SD: + printf(": W83791SD\n"); + break; case WB_CHIPID_W83792D: if (devid >= 0x10 && devid <= 0x29) printf(": W83782D rev %c\n", 'A' + devid - 0x10); |