Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146513199
D23724.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1007 B
Referenced Files
None
Subscribers
None
D23724.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 4, 7:00 AM (18 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29222511
Default Alt Text
D23724.diff (1007 B)
Attached To
Mode
D23724: acpi_lid: correct Lid state after boot and resume
Attached
Detach File
Event Timeline
Log In to Comment