platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse
authorAaron Ma <aaron.ma@canonical.com>
Fri, 2 Oct 2020 17:09:16 +0000 (01:09 +0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 5 Oct 2020 09:20:42 +0000 (12:20 +0300)
commit720ef73d1a239e33c3ad8fac356b9b1348e68aaf
tree483c869ff06cfeed8ecd40b450f0ee87f481b407
parent9fb77799557d1537a059161bf645db7be9e358ae
platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse

Evaluating ACPI _BCL could fail, then ACPI buffer size will be set to 0.
When reuse this ACPI buffer, AE_BUFFER_OVERFLOW will be triggered.

Re-initialize buffer size will make ACPI evaluate successfully.

Fixes: 46445b6b896fd ("thinkpad-acpi: fix handle locate for video and query of _BCL")
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c