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@xxxxxxxxxxxxxxx> --- 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