[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200122112306.64598-8-andriy.shevchenko@linux.intel.com>
Date: Wed, 22 Jan 2020 13:23:04 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v3 7/9] platform/x86: surface3_wmi: Switch DMI table match to a test of variable
Since we have a common x86 quirk that provides an exported variable,
use it instead of local DMI table match.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/platform/x86/surface3-wmi.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c
index 130b6f52a600..5eeedc4ddb8a 100644
--- a/drivers/platform/x86/surface3-wmi.c
+++ b/drivers/platform/x86/surface3-wmi.c
@@ -11,9 +11,9 @@
#include <linux/slab.h>
#include <linux/acpi.h>
-#include <linux/dmi.h>
#include <linux/input.h>
#include <linux/mutex.h>
+#include <linux/platform_data/x86/machine.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
@@ -29,18 +29,6 @@ MODULE_LICENSE("GPL");
MODULE_ALIAS("wmi:" SURFACE3_LID_GUID);
-static const struct dmi_system_id surface3_dmi_table[] = {
-#if defined(CONFIG_X86)
- {
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
- },
- },
-#endif
- { }
-};
-
struct surface3_wmi {
struct acpi_device *touchscreen_adev;
struct acpi_device *pnp0c0d_adev;
@@ -201,7 +189,7 @@ static int __init s3_wmi_probe(struct platform_device *pdev)
{
int error;
- if (!dmi_check_system(surface3_dmi_table))
+ if (!x86_microsoft_surface_3_machine)
return -ENODEV;
memset(&s3_wmi, 0, sizeof(s3_wmi));
--
2.24.1
Powered by blists - more mailing lists