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 | |
parent | a80a7ee45a113c3994fff27db52888e104c81807 (diff) |
Support W83791SD as an lm(4) without sensors.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/lm78.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/lm78var.h | 4 |
2 files changed, 10 insertions, 4 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); diff --git a/sys/dev/ic/lm78var.h b/sys/dev/ic/lm78var.h index 3eda4b42fb8..ab6f9cd4ae0 100644 --- a/sys/dev/ic/lm78var.h +++ b/sys/dev/ic/lm78var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78var.h,v 1.3 2006/01/15 22:03:17 kettenis Exp $ */ +/* $OpenBSD: lm78var.h,v 1.4 2006/01/17 22:01:48 kettenis Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -106,7 +106,7 @@ #define WB_CHIPID_W83783S 0x40 #define WB_CHIPID_W83697HF 0x60 #define WB_CHIPID_W83791D 0x71 -#define WB_CHIPID_W83791D_2 0x72 +#define WB_CHIPID_W83791SD 0x72 #define WB_CHIPID_W83792D 0x7a #define WB_CHIPID_W83637HF 0x80 #define WB_CHIPID_W83627THF 0x90 |