From fd70da6a6267c91fbdda9c560f098cfd52fba00f Mon Sep 17 00:00:00 2001 From: "Darren Hart (VMware)" Date: Fri, 19 May 2017 19:28:36 -0700 Subject: platform/x86: wmi: Require query for data blocks, rename writable to setable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Microsoft WMI documentation requires all data blocks to implement the Query Control Method (WQxx). If we encounter a data block not implementing this control method, issue a warning, and ignore the data block. Remove the "readable" attribute as all data blocks must be readable (query-able). Be consistent with the language in the documentation, replace the "writable" attribute with "setable". Simplify (flatten) the control flow of wmi_create_device a bit while we are updating it for the above changes. Signed-off-by: Darren Hart (VMware) Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: linux-kernel@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki --- include/linux/wmi.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/linux/wmi.h') diff --git a/include/linux/wmi.h b/include/linux/wmi.h index a283768afb7e..cd0d7734dc49 100644 --- a/include/linux/wmi.h +++ b/include/linux/wmi.h @@ -22,11 +22,8 @@ struct wmi_device { struct device dev; - /* - * These are true for data objects that support reads and writes, - * respectively. - */ - bool readable, writeable; + /* True for data blocks implementing the Set Control Method */ + bool setable; }; /* Caller must kfree the result. */ -- cgit v1.2.3-59-g8ed1b