lkml.org 
[lkml]   [2020]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v1 6/8] platform/x86: surface3_wmi: Switch DMI table match to a test of variable
    Date
    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@linux.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
    \
     
     \ /
      Last update: 2020-01-17 18:57    [W:3.114 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site