diff options
| author | 2009-04-26 02:20:58 +0000 | |
|---|---|---|
| committer | 2009-04-26 02:20:58 +0000 | |
| commit | 68ee49a25c174f30fd542cda4d39ca444dbbff2a (patch) | |
| tree | ddbc210870a58590f9a78656d622e52ebec36ae0 | |
| parent | correct case; it has to be loginShell (diff) | |
| download | wireguard-openbsd-68ee49a25c174f30fd542cda4d39ca444dbbff2a.tar.xz wireguard-openbsd-68ee49a25c174f30fd542cda4d39ca444dbbff2a.zip | |
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
| -rw-r--r-- | sys/dev/acpi/acpithinkpad.c | 4 | ||||
| -rw-r--r-- | sys/dev/acpi/acpitz.c | 3 | ||||
| -rw-r--r-- | sys/dev/gpio/gpiodcf.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/if_iwn.c | 3 | ||||
| -rw-r--r-- | sys/dev/pci/if_wpi.c | 3 | ||||
| -rw-r--r-- | sys/dev/pci/mbg.c | 6 | ||||
| -rw-r--r-- | sys/dev/usb/udcf.c | 6 | ||||
| -rw-r--r-- | sys/dev/usb/umbg.c | 6 | ||||
| -rw-r--r-- | sys/dev/vmt.c | 4 |
9 files changed, 9 insertions, 32 deletions
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 <jcs@openbsd.org> * @@ -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 <canacar@openbsd.org> * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> @@ -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); diff --git a/sys/dev/gpio/gpiodcf.c b/sys/dev/gpio/gpiodcf.c index 58d5abc5ed7..af8f28c08f9 100644 --- a/sys/dev/gpio/gpiodcf.c +++ b/sys/dev/gpio/gpiodcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpiodcf.c,v 1.1 2008/11/28 17:42:43 mbalmer Exp $ */ +/* $OpenBSD: gpiodcf.c,v 1.2 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> @@ -192,15 +192,11 @@ gpiodcf_attach(struct device *parent, struct device *self, void *aux) sc->sc_sensor.type = SENSOR_TIMEDELTA; sc->sc_sensor.status = SENSOR_S_UNKNOWN; - sc->sc_sensor.value = 0LL; - sc->sc_sensor.flags = 0; sensor_attach(&sc->sc_sensordev, &sc->sc_sensor); #ifdef GPIODCF_DEBUG sc->sc_skew.type = SENSOR_TIMEDELTA; sc->sc_skew.status = SENSOR_S_UNKNOWN; - sc->sc_skew.value = 0LL; - sc->sc_skew.flags = 0; strlcpy(sc->sc_skew.desc, "local clock skew", sizeof(sc->sc_skew.desc)); sensor_attach(&sc->sc_sensordev, &sc->sc_skew); diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index b8b19a741e7..ea4e3a382cc 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.49 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.50 2009/04/26 02:20:58 cnst Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -608,7 +608,6 @@ iwn_sensor_attach(struct iwn_softc *sc) sizeof sc->sensordev.xname); sc->sensor.type = SENSOR_TEMP; /* Temperature is not valid unless interface is up. */ - sc->sensor.value = 0; sc->sensor.flags = SENSOR_FINVALID; sensor_attach(&sc->sensordev, &sc->sensor); sensordev_install(&sc->sensordev); diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index d1f9b2c724b..b4f774cd94e 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.84 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.85 2009/04/26 02:20:58 cnst Exp $ */ /*- * Copyright (c) 2006-2008 @@ -367,7 +367,6 @@ wpi_sensor_attach(struct wpi_softc *sc) sizeof sc->sensor.desc); sc->sensor.type = SENSOR_INTEGER; /* not in muK! */ /* Temperature is not valid unless interface is up. */ - sc->sensor.value = 0; sc->sensor.flags = SENSOR_FINVALID; sensor_attach(&sc->sensordev, &sc->sensor); sensordev_install(&sc->sensordev); diff --git a/sys/dev/pci/mbg.c b/sys/dev/pci/mbg.c index 6f266193188..7e9c5bcdaac 100644 --- a/sys/dev/pci/mbg.c +++ b/sys/dev/pci/mbg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mbg.c,v 1.27 2008/11/23 14:19:40 mbalmer Exp $ */ +/* $OpenBSD: mbg.c,v 1.28 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2006, 2007 Marc Balmer <mbalmer@openbsd.org> @@ -208,14 +208,10 @@ mbg_attach(struct device *parent, struct device *self, void *aux) sc->sc_timedelta.type = SENSOR_TIMEDELTA; sc->sc_timedelta.status = SENSOR_S_UNKNOWN; - sc->sc_timedelta.value = 0LL; - sc->sc_timedelta.flags = 0; sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta); sc->sc_signal.type = SENSOR_PERCENT; sc->sc_signal.status = SENSOR_S_UNKNOWN; - sc->sc_signal.value = 0LL; - sc->sc_signal.flags = 0; strlcpy(sc->sc_signal.desc, "Signal", sizeof(sc->sc_signal.desc)); sensor_attach(&sc->sc_sensordev, &sc->sc_signal); diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c index bf90062a737..91b2a46734b 100644 --- a/sys/dev/usb/udcf.c +++ b/sys/dev/usb/udcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udcf.c,v 1.45 2008/11/21 11:36:19 mbalmer Exp $ */ +/* $OpenBSD: udcf.c,v 1.46 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org> @@ -226,15 +226,11 @@ udcf_attach(struct device *parent, struct device *self, void *aux) sc->sc_sensor.type = SENSOR_TIMEDELTA; sc->sc_sensor.status = SENSOR_S_UNKNOWN; - sc->sc_sensor.value = 0LL; - sc->sc_sensor.flags = 0; sensor_attach(&sc->sc_sensordev, &sc->sc_sensor); #ifdef UDCF_DEBUG sc->sc_skew.type = SENSOR_TIMEDELTA; sc->sc_skew.status = SENSOR_S_UNKNOWN; - sc->sc_skew.value = 0LL; - sc->sc_skew.flags = 0; strlcpy(sc->sc_skew.desc, "local clock skew", sizeof(sc->sc_skew.desc)); sensor_attach(&sc->sc_sensordev, &sc->sc_skew); diff --git a/sys/dev/usb/umbg.c b/sys/dev/usb/umbg.c index 877eac73075..b204edb4e50 100644 --- a/sys/dev/usb/umbg.c +++ b/sys/dev/usb/umbg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umbg.c,v 1.8 2008/11/21 11:38:12 mbalmer Exp $ */ +/* $OpenBSD: umbg.c,v 1.9 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org> @@ -191,15 +191,11 @@ umbg_attach(struct device *parent, struct device *self, void *aux) sc->sc_timedelta.type = SENSOR_TIMEDELTA; sc->sc_timedelta.status = SENSOR_S_UNKNOWN; - sc->sc_timedelta.value = 0LL; - sc->sc_timedelta.flags = 0; strlcpy(sc->sc_timedelta.desc, "USB5131", sizeof(sc->sc_timedelta.desc)); sensor_attach(&sc->sc_sensordev, &sc->sc_timedelta); sc->sc_signal.type = SENSOR_PERCENT; - sc->sc_signal.value = 0LL; - sc->sc_signal.flags = 0; strlcpy(sc->sc_signal.desc, "Signal", sizeof(sc->sc_signal.desc)); sensor_attach(&sc->sc_sensordev, &sc->sc_signal); sensordev_install(&sc->sc_sensordev); diff --git a/sys/dev/vmt.c b/sys/dev/vmt.c index d11263b8011..afe5b3d5696 100644 --- a/sys/dev/vmt.c +++ b/sys/dev/vmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmt.c,v 1.4 2008/10/23 22:22:43 deraadt Exp $ */ +/* $OpenBSD: vmt.c,v 1.5 2009/04/26 02:20:58 cnst Exp $ */ /* * Copyright (c) 2007 David Crawshaw <david@zentus.com> @@ -240,8 +240,6 @@ vmt_attach(struct device *parent, struct device *self, void *aux) sc->sc_sensor.type = SENSOR_TIMEDELTA; sc->sc_sensor.status = SENSOR_S_UNKNOWN; - sc->sc_sensor.value = 0LL; - sc->sc_sensor.flags = 0; sensor_attach(&sc->sc_sensordev, &sc->sc_sensor); sensordev_install(&sc->sc_sensordev); |
