Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c in sysctl_dbcool_behavior() - actually use the a...



details:   https://anonhg.NetBSD.org/src/rev/1399f4071ccb
branches:  trunk
changeset: 935877:1399f4071ccb
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sun Jul 12 06:42:32 2020 +0000

description:
in sysctl_dbcool_behavior() - actually use the array index when translating
text from sysctl -w *.behavior=<whatever>
now this actually works on my sb2500's two adm1030s

diffstat:

 sys/dev/i2c/dbcool.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f8debe5850b8 -r 1399f4071ccb sys/dev/i2c/dbcool.c
--- a/sys/dev/i2c/dbcool.c      Sun Jul 12 06:40:11 2020 +0000
+++ b/sys/dev/i2c/dbcool.c      Sun Jul 12 06:42:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dbcool.c,v 1.55 2020/07/12 06:38:56 macallan Exp $ */
+/*     $NetBSD: dbcool.c,v 1.56 2020/07/12 06:42:32 macallan Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.55 2020/07/12 06:38:56 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.56 2020/07/12 06:42:32 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1314,7 +1314,7 @@
                        break;
        if (i >= __arraycount(behavior))
                return EINVAL;
-
+       newreg = i;
        if (sc->sc_dc.dc_chip->flags & DBCFLAG_ADM1030) {
                /*
                 * ADM1030 splits fan controller behavior across two



Home | Main Index | Thread Index | Old Index