aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/wmi.c
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2021-09-04 17:55:29 +0000
committerHans de Goede <hdegoede@redhat.com>2021-09-14 12:26:01 +0200
commit1c95ace78b6e8e8c88fdcc1b5d6dc6a186914e25 (patch)
tree6fc9f1fa24ff3ce58c7eeea3ff115b21af4b0950 /drivers/platform/x86/wmi.c
parentplatform/x86: wmi: remove unnecessary checks (diff)
downloadlinux-dev-1c95ace78b6e8e8c88fdcc1b5d6dc6a186914e25.tar.xz
linux-dev-1c95ace78b6e8e8c88fdcc1b5d6dc6a186914e25.zip
platform/x86: wmi: use BIT() macro
Instead of manually creating the bit masks, use the `BIT()` macro to do it. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20210904175450.156801-12-pobrn@protonmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r--drivers/platform/x86/wmi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 147cc5086f2a..2edf0cf5137b 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -17,6 +17,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/acpi.h>
+#include <linux/bits.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -70,10 +71,10 @@ struct wmi_block {
* If the GUID data block is marked as expensive, we must enable and
* explicitily disable data collection.
*/
-#define ACPI_WMI_EXPENSIVE 0x1
-#define ACPI_WMI_METHOD 0x2 /* GUID is a method */
-#define ACPI_WMI_STRING 0x4 /* GUID takes & returns a string */
-#define ACPI_WMI_EVENT 0x8 /* GUID is an event */
+#define ACPI_WMI_EXPENSIVE BIT(0)
+#define ACPI_WMI_METHOD BIT(1) /* GUID is a method */
+#define ACPI_WMI_STRING BIT(2) /* GUID takes & returns a string */
+#define ACPI_WMI_EVENT BIT(3) /* GUID is an event */
static bool debug_event;
module_param(debug_event, bool, 0444);