summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2013-05-02 04:35:44 +0000
committerdlg <dlg@openbsd.org>2013-05-02 04:35:44 +0000
commit29841942fe950939944568342a601bbfcb10a2d8 (patch)
treeddeacf04cd5844f5770ef792db3cc5e96c673c35
parentremove static from a simple lock to avoid a compiler warning/error that (diff)
downloadwireguard-openbsd-29841942fe950939944568342a601bbfcb10a2d8.tar.xz
wireguard-openbsd-29841942fe950939944568342a601bbfcb10a2d8.zip
always attach the battery sensor if the adapter lets us query it.
newly replaced batteries dont show up immediately.
-rw-r--r--sys/dev/ic/mfi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 1b876682293..b9b6ead958c 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.142 2013/05/01 03:44:21 dlg Exp $ */
+/* $OpenBSD: mfi.c,v 1.143 2013/05/02 04:35:44 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -2069,8 +2069,7 @@ mfi_create_sensors(struct mfi_softc *sc)
strlcpy(sc->sc_sensordev.xname, DEVNAME(sc),
sizeof(sc->sc_sensordev.xname));
- if (ISSET(letoh32(sc->sc_info.mci_hw_present), MFI_INFO_HW_BBU) &&
- ISSET(letoh32(sc->sc_info.mci_adapter_ops ), MFI_INFO_AOPS_BBU)) {
+ if (ISSET(letoh32(sc->sc_info.mci_adapter_ops ), MFI_INFO_AOPS_BBU)) {
sc->sc_bbu = malloc(sizeof(*sc->sc_bbu), M_DEVBUF,
M_WAITOK | M_ZERO);