diff options
author | Matan Ziv-Av <matan@svgalib.org> | 2021-11-23 22:14:55 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-12-02 12:58:26 +0100 |
commit | 60a076ea8a6d4e5216d5232d8bc98164c7bc1ffd (patch) | |
tree | 7f1e6bc4e3ba69684e49a19be6ede1c9f75f7b65 /drivers | |
parent | 37f34df84ac76703536e5bec0b209f1e82a8a0cd (diff) |
platform/x86: lg-laptop: Recognize more models
LG uses 5 instead of 0 in the third digit (second digit after 2019)
of the year string to indicate newer models in the same year.
Handle this case as well.
Signed-off-by: Matan Ziv-Av <matan@svgalib.org>
Link: https://lore.kernel.org/r/c752b3b2-9718-bd9a-732d-e165aa8a1fca@svgalib.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/platform/x86/lg-laptop.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c index ae9293024c77..a91847a551a7 100644 --- a/drivers/platform/x86/lg-laptop.c +++ b/drivers/platform/x86/lg-laptop.c @@ -657,6 +657,18 @@ static int acpi_add(struct acpi_device *device) if (product && strlen(product) > 4) switch (product[4]) { case '5': + if (strlen(product) > 5) + switch (product[5]) { + case 'N': + year = 2021; + break; + case '0': + year = 2016; + break; + default: + year = 2022; + } + break; case '6': year = 2016; break; |