-/* $OpenBSD: acpiac.c,v 1.34 2021/10/30 23:24:47 deraadt Exp $ */
+/* $OpenBSD: acpiac.c,v 1.35 2022/03/21 13:38:34 kettenis Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
acpiac_refresh(void *arg)
{
struct acpiac_softc *sc = arg;
+ extern int hw_power;
acpiac_getpsr(sc);
sc->sc_sens[0].value = sc->sc_ac_stat;
+ hw_power = (sc->sc_ac_stat == PSR_ONLINE);
}
int
acpiac_notify(struct aml_node *node, int notify_type, void *arg)
{
struct acpiac_softc *sc = arg;
- extern int hw_power;
dnprintf(10, "acpiac_notify: %.2x %s\n", notify_type,
DEVNAME(sc));
dnprintf(10, "A/C status: %d\n", sc->sc_ac_stat);
break;
}
- hw_power = (sc->sc_ac_stat == PSR_ONLINE);
return (0);
}