diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-26 08:45:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-26 08:45:13 +0000 |
commit | 659bb9550f79105632c134c91dc5f17c1f6121b1 (patch) | |
tree | c00511c3e43279bc54c1b3b9071566c882a05dba /sys/arch/i386 | |
parent | c6188fdde5deb0c9d44887457d84736e66e19ae0 (diff) |
Add an explicit check for supported models (10, 13, 15) before setting up the
Via CPU temperature sensor task, otherwise it is added for model 9 as well
which is not supported.
ok kevlo
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index c67b1513fb3..b105d4a8cb2 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.465 2009/11/23 16:21:54 pirofti Exp $ */ +/* $OpenBSD: machdep.c,v 1.466 2009/11/26 08:45:12 nicm Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1081,13 +1081,15 @@ cyrix3_cpu_setup(struct cpu_info *ci) case 13: /* C7-M Type D */ case 15: /* Nano */ #if !defined(SMALL_KERNEL) - /* Setup the sensors structures */ - strlcpy(ci->ci_sensordev.xname, ci->ci_dev.dv_xname, - sizeof(ci->ci_sensordev.xname)); - ci->ci_sensor.type = SENSOR_TEMP; - sensor_task_register(ci, via_update_sensor, 5); - sensor_attach(&ci->ci_sensordev, &ci->ci_sensor); - sensordev_install(&ci->ci_sensordev); + if (model == 10 || model == 13 || model == 15) { + /* Setup the sensors structures */ + strlcpy(ci->ci_sensordev.xname, ci->ci_dev.dv_xname, + sizeof(ci->ci_sensordev.xname)); + ci->ci_sensor.type = SENSOR_TEMP; + sensor_task_register(ci, via_update_sensor, 5); + sensor_attach(&ci->ci_sensordev, &ci->ci_sensor); + sensordev_install(&ci->ci_sensordev); + } #endif default: |