diff options
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index ebcb461bb2b0..22d893654d28 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -8574,7 +8574,8 @@ static bool __pure __init tpacpi_is_valid_fw_id(const char* const s, | |||
8574 | return s && strlen(s) >= 8 && | 8574 | return s && strlen(s) >= 8 && |
8575 | tpacpi_is_fw_digit(s[0]) && | 8575 | tpacpi_is_fw_digit(s[0]) && |
8576 | tpacpi_is_fw_digit(s[1]) && | 8576 | tpacpi_is_fw_digit(s[1]) && |
8577 | s[2] == t && s[3] == 'T' && | 8577 | s[2] == t && |
8578 | (s[3] == 'T' || s[3] == 'N') && | ||
8578 | tpacpi_is_fw_digit(s[4]) && | 8579 | tpacpi_is_fw_digit(s[4]) && |
8579 | tpacpi_is_fw_digit(s[5]); | 8580 | tpacpi_is_fw_digit(s[5]); |
8580 | } | 8581 | } |
@@ -8607,7 +8608,8 @@ static int __must_check __init get_thinkpad_model_data( | |||
8607 | return -ENOMEM; | 8608 | return -ENOMEM; |
8608 | 8609 | ||
8609 | /* Really ancient ThinkPad 240X will fail this, which is fine */ | 8610 | /* Really ancient ThinkPad 240X will fail this, which is fine */ |
8610 | if (!tpacpi_is_valid_fw_id(tp->bios_version_str, 'E')) | 8611 | if (!(tpacpi_is_valid_fw_id(tp->bios_version_str, 'E') || |
8612 | tpacpi_is_valid_fw_id(tp->bios_version_str, 'C'))) | ||
8611 | return 0; | 8613 | return 0; |
8612 | 8614 | ||
8613 | tp->bios_model = tp->bios_version_str[0] | 8615 | tp->bios_model = tp->bios_version_str[0] |