diff options
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index cc4155c3620e..d69ab3f0bdbc 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
| @@ -1621,6 +1621,9 @@ static void tpacpi_remove_driver_attributes(struct device_driver *drv) | |||
| 1621 | * | 1621 | * |
| 1622 | * Sources: IBM ThinkPad Public Web Documents (update changelogs), | 1622 | * Sources: IBM ThinkPad Public Web Documents (update changelogs), |
| 1623 | * Information from users in ThinkWiki | 1623 | * Information from users in ThinkWiki |
| 1624 | * | ||
| 1625 | * WARNING: we use this table also to detect that the machine is | ||
| 1626 | * a ThinkPad in some cases, so don't remove entries lightly. | ||
| 1624 | */ | 1627 | */ |
| 1625 | 1628 | ||
| 1626 | #define TPV_Q(__v, __id1, __id2, __bv1, __bv2) \ | 1629 | #define TPV_Q(__v, __id1, __id2, __bv1, __bv2) \ |
| @@ -1782,6 +1785,12 @@ static void __init tpacpi_check_outdated_fw(void) | |||
| 1782 | } | 1785 | } |
| 1783 | } | 1786 | } |
| 1784 | 1787 | ||
| 1788 | static bool __init tpacpi_is_fw_known(void) | ||
| 1789 | { | ||
| 1790 | return tpacpi_check_quirks(tpacpi_bios_version_qtable, | ||
| 1791 | ARRAY_SIZE(tpacpi_bios_version_qtable)) != 0; | ||
| 1792 | } | ||
| 1793 | |||
| 1785 | /**************************************************************************** | 1794 | /**************************************************************************** |
| 1786 | **************************************************************************** | 1795 | **************************************************************************** |
| 1787 | * | 1796 | * |
| @@ -7706,9 +7715,11 @@ static int __init probe_for_thinkpad(void) | |||
| 7706 | 7715 | ||
| 7707 | /* | 7716 | /* |
| 7708 | * Non-ancient models have better DMI tagging, but very old models | 7717 | * Non-ancient models have better DMI tagging, but very old models |
| 7709 | * don't. | 7718 | * don't. tpacpi_is_fw_known() is a cheat to help in that case. |
| 7710 | */ | 7719 | */ |
| 7711 | is_thinkpad = (thinkpad_id.model_str != NULL); | 7720 | is_thinkpad = (thinkpad_id.model_str != NULL) || |
| 7721 | (thinkpad_id.ec_model != 0) || | ||
| 7722 | tpacpi_is_fw_known(); | ||
| 7712 | 7723 | ||
| 7713 | /* ec is required because many other handles are relative to it */ | 7724 | /* ec is required because many other handles are relative to it */ |
| 7714 | TPACPI_ACPIHANDLE_INIT(ec); | 7725 | TPACPI_ACPIHANDLE_INIT(ec); |
| @@ -7719,13 +7730,6 @@ static int __init probe_for_thinkpad(void) | |||
| 7719 | return -ENODEV; | 7730 | return -ENODEV; |
| 7720 | } | 7731 | } |
| 7721 | 7732 | ||
| 7722 | /* | ||
| 7723 | * Risks a regression on very old machines, but reduces potential | ||
| 7724 | * false positives a damn great deal | ||
| 7725 | */ | ||
| 7726 | if (!is_thinkpad) | ||
| 7727 | is_thinkpad = (thinkpad_id.vendor == PCI_VENDOR_ID_IBM); | ||
| 7728 | |||
| 7729 | if (!is_thinkpad && !force_load) | 7733 | if (!is_thinkpad && !force_load) |
| 7730 | return -ENODEV; | 7734 | return -ENODEV; |
| 7731 | 7735 | ||
