From d344f77a9af3c3c22eb56bc584b6c9aaf65c605c Mon Sep 17 00:00:00 2001 From: "Constantine A. Murenin" Date: Sun, 26 Apr 2009 02:20:59 +0000 Subject: in ca_attach() there is no need to set .value and .flags of sensors to 0, since autoconf(9) allocates softc with M_ZERO; ok deraadt --- sys/dev/acpi/acpithinkpad.c | 4 +--- sys/dev/acpi/acpitz.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/dev/acpi') diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c index 76b8c5df006..346e2507990 100644 --- a/sys/dev/acpi/acpithinkpad.c +++ b/sys/dev/acpi/acpithinkpad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpithinkpad.c,v 1.18 2009/03/11 20:52:11 jordan Exp $ */ +/* $OpenBSD: acpithinkpad.c,v 1.19 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2008 joshua stein * @@ -157,7 +157,6 @@ thinkpad_sensor_attach(struct acpithinkpad_softc *sc) snprintf(sc->sc_sens[i].desc, sizeof(sc->sc_sens[i].desc), "TMP%d", i); sc->sc_sens[i].type = SENSOR_TEMP; - sc->sc_sens[i].value = 0; sensor_attach(&sc->sc_sensdev, &sc->sc_sens[i]); } @@ -165,7 +164,6 @@ thinkpad_sensor_attach(struct acpithinkpad_softc *sc) strlcpy(sc->sc_sens[i].desc, "fan", sizeof(sc->sc_sens[i].desc)); sc->sc_sens[i].type = SENSOR_FANRPM; - sc->sc_sens[i].value = 0; sensor_attach(&sc->sc_sensdev, &sc->sc_sens[i]); sensordev_install(&sc->sc_sensdev); diff --git a/sys/dev/acpi/acpitz.c b/sys/dev/acpi/acpitz.c index 91eb0bde3e3..8039e6b85be 100644 --- a/sys/dev/acpi/acpitz.c +++ b/sys/dev/acpi/acpitz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpitz.c,v 1.30 2009/04/19 21:50:02 cnst Exp $ */ +/* $OpenBSD: acpitz.c,v 1.31 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2006 Can Erkin Acar * Copyright (c) 2005 Marco Peereboom @@ -142,7 +142,6 @@ acpitz_attach(struct device *parent, struct device *self, void *aux) sc->sc_sens.type = SENSOR_TEMP; sensor_attach(&sc->sc_sensdev, &sc->sc_sens); sensordev_install(&sc->sc_sensdev); - sc->sc_sens.value = 0; aml_register_notify(sc->sc_devnode, NULL, acpitz_notify, sc, ACPIDEV_POLL); -- cgit v1.2.3