summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2021-12-30 02:09:31 +0100
committerFelix Singer <felixsinger@posteo.net>2021-12-31 08:58:26 +0000
commit1eba1968b54f581756bc964045269045e2ce1bf4 (patch)
tree5f29346a1344b2ceaab90074e7bd183591d64a29 /src/drivers/intel
parentf94ec24eb9b22dc35c51f3bc3cf1a8614297a33c (diff)
drivers/intel/gma/acpi: Replace Subtract(a,b) with ASL 2.0 syntax
Replace `Subtract (a, b)` with `a - b`. Change-Id: I4f6ffd6bbf6a37e041879e50fe41ce3cc856371f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60497 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/gma/acpi/common.asl4
-rw-r--r--src/drivers/intel/gma/acpi/configure_brightness_levels.asl6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/drivers/intel/gma/acpi/common.asl b/src/drivers/intel/gma/acpi/common.asl
index 254a66d605..02169ae874 100644
--- a/src/drivers/intel/gma/acpi/common.asl
+++ b/src/drivers/intel/gma/acpi/common.asl
@@ -9,7 +9,7 @@
Store (Match (BRIG, MEQ, Arg0, MTR, Zero, 2), Local0)
If (LEqual (Local0, Ones))
{
- Return (Subtract(SizeOf(BRIG), One))
+ Return (SizeOf(BRIG) - 1)
}
Return (Local0)
}
@@ -56,7 +56,7 @@
Notify (LCD0, 0x86)
} Else {
Store (BRID (XBQC ()), Local0)
- If (LNotEqual (Local0, Subtract(SizeOf(BRIG), One)))
+ If (LNotEqual (Local0, SizeOf(BRIG) - 1))
{
Increment (Local0)
}
diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
index 92ae766661..3581f4d30c 100644
--- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
+++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl
@@ -121,15 +121,13 @@
/* Local1: loop index (selectable values start at 2 in BRIG) */
Store (2, Local1)
- While (LLess (Local1, Subtract (SizeOf (BRIG), 1))) {
+ While (LLess (Local1, SizeOf (BRIG) - 1)) {
/* Local[23]: adjacent values in BRIG */
Store (DeRefOf (BRIG[Local1]), Local2)
Store (DeRefOf (BRIG[Add (Local1, 1)]), Local3)
If (LLess (Local0, Local3)) {
- If (LOr (LLess (Local0, Local2),
- LLess (Subtract (Local0, Local2),
- Subtract (Local3, Local0)))) {
+ If (LOr (LLess (Local0, Local2), LLess (Local0 - Local2, Local3 - Local0))) {
Return (Local2)
} Else {
Return (Local3)