diff options
author | kn <kn@openbsd.org> | 2021-04-01 12:06:00 +0000 |
---|---|---|
committer | kn <kn@openbsd.org> | 2021-04-01 12:06:00 +0000 |
commit | e3984b72ded6257b54cce4c5ab9b83e0cc80fcf9 (patch) | |
tree | 6dc3cc8b6865fac980da80a14daffd052c7196cc /sys/dev/fdt/cwfg.c | |
parent | Remove extraneous call of vm_getbyvmid during pause event (diff) | |
download | wireguard-openbsd-e3984b72ded6257b54cce4c5ab9b83e0cc80fcf9.tar.xz wireguard-openbsd-e3984b72ded6257b54cce4c5ab9b83e0cc80fcf9.zip |
Clean up nonexistent/unused properties handling
Never used since import and probably just ported over from NetBSD as-is;
"design-capacity" does not exist in the device tree binding.
"monitor-interval-ms" defaults to 250ms as per binding and could be used
in the sensor_task_register() call, but our framework only supports whole
seconds and there's no advantage over our current fixed poll interval of 5s.
OK patrick
Diffstat (limited to '')
-rw-r--r-- | sys/dev/fdt/cwfg.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/dev/fdt/cwfg.c b/sys/dev/fdt/cwfg.c index ad174fbf1ce..7090d1cfcf7 100644 --- a/sys/dev/fdt/cwfg.c +++ b/sys/dev/fdt/cwfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cwfg.c,v 1.5 2021/04/01 10:34:21 kn Exp $ */ +/* $OpenBSD: cwfg.c,v 1.6 2021/04/01 12:06:00 kn Exp $ */ /* $NetBSD: cwfg.c,v 1.1 2020/01/03 18:00:05 jmcneill Exp $ */ /*- * Copyright (c) 2020 Jared McNeill <jmcneill@invisible.ca> @@ -89,16 +89,10 @@ struct cwfg_softc { uint8_t sc_batinfo[BATINFO_SIZE]; - uint32_t sc_monitor_interval; - uint32_t sc_design_capacity; - struct ksensor sc_sensor[CWFG_NSENSORS]; struct ksensordev sc_sensordev; }; -#define CWFG_MONITOR_INTERVAL_DEFAULT 5000 -#define CWFG_DESIGN_CAPACITY_DEFAULT 2000 - int cwfg_match(struct device *, void *, void *); void cwfg_attach(struct device *, struct device *, void *); @@ -181,11 +175,6 @@ cwfg_attach(struct device *parent, struct device *self, void *aux) } free(batinfo, M_TEMP, len); - sc->sc_monitor_interval = OF_getpropint(sc->sc_node, - "cellwise,monitor-interval-ms", CWFG_MONITOR_INTERVAL_DEFAULT); - sc->sc_design_capacity = OF_getpropint(sc->sc_node, - "cellwise,design-capacity", CWFG_DESIGN_CAPACITY_DEFAULT); - if (cwfg_init(sc) != 0) { printf(": failed to initialize device\n"); return; |