git: 9front

Download patch

ref: fe9e1b79b0be791a6f581932ca75d5f8f33f1d9b
parent: 1bfee66514eb7e2731594b2f4cff7e0913b3d4f5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 28 08:16:45 EDT 2023

aux/acpi: no need for amlval(), amleval() will dereference the name and run the method

--- a/sys/src/cmd/aux/acpi.c
+++ b/sys/src/cmd/aux/acpi.c
@@ -310,10 +310,10 @@
 	/* The ACPI spec requires we call _TTS and _PTS to prepare
 	 * the system to go to _S5 state. If they fail, too bad,
 	 * try to go to _S5 state anyway. */
-	pts = amlval(amlwalk(amlroot, "_PTS"));
-	tts = amlval(amlwalk(amlroot, "_TTS"));
+	pts = amlwalk(amlroot, "_PTS");
 	if(pts)
 		amleval(pts, "i", 5, nil);
+	tts = amlwalk(amlroot, "_TTS");
 	if(tts)
 		amleval(tts, "i", 5, nil);
 
--