ACPI / osi: Fix default _OSI(Darwin) support
authorChen Yu <yu.c.chen@intel.com>
Tue, 3 May 2016 08:48:39 +0000 (16:48 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 4 May 2016 22:13:52 +0000 (00:13 +0200)
commite10cfdc33a0f23dc8449be7267f0a642e96a2a24
tree8eb360b24f377a9c3ec5428b3fb8a1467e419621
parenta707edebadf1230f202000f29b28b7586ada4aa3
ACPI / osi: Fix default _OSI(Darwin) support

The following commit always reports positive value when Apple hardware
queries _OSI("Darwin"):

 Commit: 7bc5a2bad0b8d9d1ac9f7b8b33150e4ddf197334
 Subject: ACPI: Support _OSI("Darwin") correctly

However since this implementation places the judgement in runtime, it
breaks acpi_osi=!Darwin and cannot return unsupported for _OSI("WinXXX")
invoked before invoking _OSI("Darwin").

This patch fixes the issues by reverting the wrong support and implementing
the default behavior of _OSI("Darwin")/_OSI("WinXXX") on Apple hardware via
DMI matching.

Fixes: 7bc5a2bad0b8 (ACPI: Support _OSI("Darwin") correctly)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=92111
Reported-and-tested-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/blacklist.c
drivers/acpi/osl.c
include/linux/acpi.h