hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/platform/x86/msi-laptop.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*-*-linux-c-*-*/
23
34 /*
45 Copyright (C) 2006 Lennart Poettering <mzxreary (at) 0pointer (dot) de>
56
6
- This program is free software; you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation; either version 2 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful, but
12
- WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
- 02110-1301, USA.
207 */
218
229 /*
....@@ -609,11 +596,10 @@
609596 {
610597 .ident = "MSI S270",
611598 .matches = {
612
- DMI_MATCH(DMI_SYS_VENDOR, "MICRO-STAR INT'L CO.,LTD"),
599
+ DMI_MATCH(DMI_SYS_VENDOR, "MICRO-STAR INT"),
613600 DMI_MATCH(DMI_PRODUCT_NAME, "MS-1013"),
614601 DMI_MATCH(DMI_PRODUCT_VERSION, "0131"),
615
- DMI_MATCH(DMI_CHASSIS_VENDOR,
616
- "MICRO-STAR INT'L CO.,LTD")
602
+ DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR INT")
617603 },
618604 .driver_data = &quirk_old_ec_model,
619605 .callback = dmi_check_cb
....@@ -646,8 +632,7 @@
646632 DMI_MATCH(DMI_SYS_VENDOR, "NOTEBOOK"),
647633 DMI_MATCH(DMI_PRODUCT_NAME, "SAM2000"),
648634 DMI_MATCH(DMI_PRODUCT_VERSION, "0131"),
649
- DMI_MATCH(DMI_CHASSIS_VENDOR,
650
- "MICRO-STAR INT'L CO.,LTD")
635
+ DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR INT")
651636 },
652637 .driver_data = &quirk_old_ec_model,
653638 .callback = dmi_check_cb
....@@ -1061,8 +1046,7 @@
10611046 return -EINVAL;
10621047
10631048 /* Register backlight stuff */
1064
-
1065
- if (quirks->old_ec_model ||
1049
+ if (quirks->old_ec_model &&
10661050 acpi_video_get_backlight_type() == acpi_backlight_vendor) {
10671051 struct backlight_properties props;
10681052 memset(&props, 0, sizeof(struct backlight_properties));
....@@ -1130,6 +1114,8 @@
11301114 fail_create_group:
11311115 if (quirks->load_scm_model) {
11321116 i8042_remove_filter(msi_laptop_i8042_filter);
1117
+ cancel_delayed_work_sync(&msi_touchpad_dwork);
1118
+ input_unregister_device(msi_laptop_input_dev);
11331119 cancel_delayed_work_sync(&msi_rfkill_dwork);
11341120 cancel_work_sync(&msi_rfkill_work);
11351121 rfkill_cleanup();
....@@ -1150,6 +1136,7 @@
11501136 {
11511137 if (quirks->load_scm_model) {
11521138 i8042_remove_filter(msi_laptop_i8042_filter);
1139
+ cancel_delayed_work_sync(&msi_touchpad_dwork);
11531140 input_unregister_device(msi_laptop_input_dev);
11541141 cancel_delayed_work_sync(&msi_rfkill_dwork);
11551142 cancel_work_sync(&msi_rfkill_work);