Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (6 weeks ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/drivers/platform/x86/acer-wmi.c

    r31574 r31859  
    356356};
    357357
     358static const struct dmi_system_id amw0_whitelist[] __initconst = {
     359        {
     360                .ident = "Acer",
     361                .matches = {
     362                        DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
     363                },
     364        },
     365        {
     366                .ident = "Gateway",
     367                .matches = {
     368                        DMI_MATCH(DMI_SYS_VENDOR, "Gateway"),
     369                },
     370        },
     371        {
     372                .ident = "Packard Bell",
     373                .matches = {
     374                        DMI_MATCH(DMI_SYS_VENDOR, "Packard Bell"),
     375                },
     376        },
     377        {}
     378};
     379
     380/*
     381 * This quirk table is only for Acer/Gateway/Packard Bell family
     382 * that those machines are supported by acer-wmi driver.
     383 */
    358384static const struct dmi_system_id acer_quirks[] __initconst = {
    359385        {
     
    465491                .driver_data = &quirk_acer_travelmate_2490,
    466492        },
     493        {}
     494};
     495
     496/*
     497 * This quirk list is for those non-acer machines that have AMW0_GUID1
     498 * but supported by acer-wmi in past days. Keeping this quirk list here
     499 * is only for backward compatible. Please do not add new machine to
     500 * here anymore. Those non-acer machines should be supported by
     501 * appropriate wmi drivers.
     502 */
     503static const struct dmi_system_id non_acer_quirks[] __initconst = {
    467504        {
    468505                .callback = dmi_matched,
     
    599636        if (!force_series) {
    600637                dmi_check_system(acer_quirks);
     638                dmi_check_system(non_acer_quirks);
    601639        } else if (force_series == 2490) {
    602640                quirks = &quirk_acer_travelmate_2490;
     
    21092147
    21102148        /*
     2149         * The AMW0_GUID1 wmi is not only found on Acer family but also other
     2150         * machines like Lenovo, Fujitsu and Medion. In the past days,
     2151         * acer-wmi driver handled those non-Acer machines by quirks list.
     2152         * But actually acer-wmi driver was loaded on any machines that have
     2153         * AMW0_GUID1. This behavior is strange because those machines should
     2154         * be supported by appropriate wmi drivers. e.g. fujitsu-laptop,
     2155         * ideapad-laptop. So, here checks the machine that has AMW0_GUID1
     2156         * should be in Acer/Gateway/Packard Bell white list, or it's already
     2157         * in the past quirk list.
     2158         */
     2159        if (wmi_has_guid(AMW0_GUID1) &&
     2160            !dmi_check_system(amw0_whitelist) &&
     2161            quirks == &quirk_unknown) {
     2162                pr_err("Unsupported machine has AMW0_GUID1, unable to load\n");
     2163                return -ENODEV;
     2164        }
     2165
     2166        /*
    21112167         * Detect which ACPI-WMI interface we're using.
    21122168         */
Note: See TracChangeset for help on using the changeset viewer.