Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c explicitly initialize sensor->state
details: https://anonhg.NetBSD.org/src/rev/82f8ec6ab20b
branches: trunk
changeset: 452014:82f8ec6ab20b
user: macallan <macallan%NetBSD.org@localhost>
date: Sat Jun 15 02:00:21 2019 +0000
description:
explicitly initialize sensor->state
diffstat:
sys/dev/i2c/adadc.c | 5 +++--
sys/dev/i2c/fcu.c | 8 +++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (62 lines):
diff -r 968cae3498b8 -r 82f8ec6ab20b sys/dev/i2c/adadc.c
--- a/sys/dev/i2c/adadc.c Sat Jun 15 00:08:25 2019 +0000
+++ b/sys/dev/i2c/adadc.c Sat Jun 15 02:00:21 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adadc.c,v 1.6 2018/06/26 06:03:57 thorpej Exp $ */
+/* $NetBSD: adadc.c,v 1.7 2019/06/15 02:00:21 macallan Exp $ */
/*-
* Copyright (c) 2018 Michael Lorenz
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adadc.c,v 1.6 2018/06/26 06:03:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adadc.c,v 1.7 2019/06/15 02:00:21 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -157,6 +157,7 @@
int reg = 0;
OF_getprop(ch, "reg", ®, sizeof(reg));
s = &sc->sc_sensors[sc->sc_nsensors];
+ s->state = ENVSYS_SINVALID;
/*
* this setup matches my 2x 2.5GHz PCI-X G5, Linux and
* FreeBSD hardcode these as well so we should be safe
diff -r 968cae3498b8 -r 82f8ec6ab20b sys/dev/i2c/fcu.c
--- a/sys/dev/i2c/fcu.c Sat Jun 15 00:08:25 2019 +0000
+++ b/sys/dev/i2c/fcu.c Sat Jun 15 02:00:21 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fcu.c,v 1.8 2018/09/03 16:29:31 riastradh Exp $ */
+/* $NetBSD: fcu.c,v 1.9 2019/06/15 02:00:21 macallan Exp $ */
/*-
* Copyright (c) 2018 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fcu.c,v 1.8 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fcu.c,v 1.9 2019/06/15 02:00:21 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -195,6 +195,8 @@
envsys_data_t *s = &sc->sc_sensors[sc->sc_nsensors];
+ s->state = ENVSYS_SINVALID;
+
if (OF_getprop(ch, "device_type", type, 32) <= 0)
goto next;
@@ -309,7 +311,7 @@
sc->sc_dying = FALSE;
kthread_create(PRI_NONE, 0, curcpu(), fcu_adjust, sc, &sc->sc_thread,
- "fan control");
+ "fan control");
}
static void
Home |
Main Index |
Thread Index |
Old Index