diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-03-21 11:20:26 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-03-22 17:54:36 +0100 |
commit | 219daafa8fc27483b2a652d9428d874bf960a6a1 (patch) | |
tree | c61fed7cc452b7c32f5a16e25a7e1b95f1b683ef /src/ec/google | |
parent | ffe58107df667b5142e3c3efd25c1ee3360038bf (diff) |
google/chromeec: Ensure \_SB.LID0 is present before using it
Since we want to support devices that do not have a lid but still use
EC, we need to conditionally check if referencing \_SB.LID0 is valid.
BUG=b:35775024
Change-Id: I92433460ec870fb07f48e67a6dfc61e3c036a129
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18941
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/ec/google')
-rw-r--r-- | src/ec/google/chromeec/acpi/ec.asl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index a40d0acbc0..67cee27adf 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -26,6 +26,9 @@ External (\_SB.DPTF.TEVT, MethodObj) External (\_SB.DPTF.TCHG, DeviceObj) #endif External (\_SB.DPTF.TPET, MethodObj) +#ifndef EC_ENABLE_LID_SWITCH +External (\_SB.LID0, DeviceObj) +#endif Device (EC0) { @@ -169,7 +172,9 @@ Device (EC0) #ifdef EC_ENABLE_LID_SWITCH Notify (LID0, 0x80) #else - Notify (\_SB.LID0, 0x80) + If (CondRefOf (\_SB.LID0)) { + Notify (\_SB.LID0, 0x80) + } #endif } @@ -181,7 +186,9 @@ Device (EC0) #ifdef EC_ENABLE_LID_SWITCH Notify (LID0, 0x80) #else - Notify (\_SB.LID0, 0x80) + If (CondRefOf (\_SB.LID0)) { + Notify (\_SB.LID0, 0x80) + } #endif } |