x86: baytrail: acpi: Create buffers outside of the methods
authorBin Meng <bmeng.cn@gmail.com>
Mon, 1 Jun 2020 04:15:13 +0000 (21:15 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 2 Jun 2020 01:16:13 +0000 (09:16 +0800)
Create buffers outside of the methods as ACPICA 20200430 complains
about this:

  Remark 2173 - Creation of named objects within a method is highly
  inefficient, use globals or method local variables instead
  (\_SB.PCI0.LPCB.IURT._CRS)

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
arch/x86/include/asm/arch-baytrail/acpi/lpc.asl

index 08b2f531323c23c926a64626b6cb2dd9c360e8f2..69455d90da8cb76cb56f3ecf68a19349a0284064 100644 (file)
@@ -136,20 +136,20 @@ Device (LPCB)
                        Store(0, C1EN)
                }
 
-               Method(_CRS, 0, Serialized)
+               Name(BUF0, ResourceTemplate()
                {
-                       Name(BUF0, ResourceTemplate()
-                       {
-                               IO(Decode16, 0x03f8, 0x03f8, 0x01, 0x08)
-                               IRQNoFlags() { 3 }
-                       })
-
-                       Name(BUF1, ResourceTemplate()
-                       {
-                               IO(Decode16, 0x03f8, 0x03f8, 0x01, 0x08)
-                               IRQNoFlags() { 4 }
-                       })
+                       IO(Decode16, 0x03f8, 0x03f8, 0x01, 0x08)
+                       IRQNoFlags() { 3 }
+               })
 
+               Name(BUF1, ResourceTemplate()
+               {
+                       IO(Decode16, 0x03f8, 0x03f8, 0x01, 0x08)
+                       IRQNoFlags() { 4 }
+               })
+
+               Method(_CRS, 0, Serialized)
+               {
                        If (LLessEqual(SRID, 0x04)) {
                                Return (BUF0)
                        } Else {