OCaml 4.14.0 rebuild
[arch-packages.git] / linux-lts / repos / core-x86_64 / 0005-lg-laptop-Recognize-more-models.patch
blob663e4be26472ad6396f7337a0f0acf017f83dae8
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Matan Ziv-Av <matan@svgalib.org>
3 Date: Tue, 23 Nov 2021 22:14:55 +0200
4 Subject: [PATCH] lg-laptop: Recognize more models
6 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.
8 Signed-off-by: Matan Ziv-Av <matan@svgalib.org>
9 For: https://bugs.archlinux.org/task/71772
10 ---
11 drivers/platform/x86/lg-laptop.c | 12 ++++++++++++
12 1 file changed, 12 insertions(+)
14 diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
15 index 88b551caeaaf..d6f74d3a7605 100644
16 --- a/drivers/platform/x86/lg-laptop.c
17 +++ b/drivers/platform/x86/lg-laptop.c
18 @@ -658,6 +658,18 @@ static int acpi_add(struct acpi_device *device)
19 if (product && strlen(product) > 4)
20 switch (product[4]) {
21 case '5':
22 + if (strlen(product) > 5)
23 + switch (product[5]) {
24 + case 'N':
25 + year = 2021;
26 + break;
27 + case '0':
28 + year = 2016;
29 + break;
30 + default:
31 + year = 2022;
32 + }
33 + break;
34 case '6':
35 year = 2016;
36 break;