Page MenuHomeFreeBSD

D23724.diff
No OneTemporary

D23724.diff

Index: head/sys/dev/acpica/acpi_lid.c
===================================================================
--- head/sys/dev/acpica/acpi_lid.c
+++ head/sys/dev/acpica/acpi_lid.c
@@ -124,13 +124,16 @@
if (acpi_parse_prw(sc->lid_handle, &prw) == 0)
AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit);
+ /* Get the initial lid status, ignore failures */
+ (void) acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status);
+
/*
* Export the lid status
*/
SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
"state", CTLFLAG_RD, &sc->lid_status, 0,
- "Device set to wake the system");
+ "Device state (0 = closed, 1 = open)");
return (0);
}
@@ -144,6 +147,13 @@
static int
acpi_lid_resume(device_t dev)
{
+ struct acpi_lid_softc *sc;
+
+ sc = device_get_softc(dev);
+
+ /* Get lid status after resume, ignore failures */
+ (void) acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status);
+
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 4, 2:27 AM (17 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29222511
Default Alt Text
D23724.diff (1007 B)

Event Timeline