aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/dell/alienware-wmi.c
diff options
context:
space:
mode:
authorIlpo Järvinen <[email protected]>2025-01-20 12:22:06 +0000
committerIlpo Järvinen <[email protected]>2025-01-21 12:00:38 +0000
commit0da9a3f9ac8ada83fa79579455871ec59f11db72 (patch)
tree48a22c56221b8c9b3639cf132330117baf2c5181 /drivers/platform/x86/dell/alienware-wmi.c
parentplatform/x86: acer-wmi: Fix initialization of last_non_turbo_profile (diff)
parentplatform/x86: lenovo-yoga-tab2-pro-1380-fastcharger: fix serdev race (diff)
downloadkernel-0da9a3f9ac8ada83fa79579455871ec59f11db72.tar.gz
kernel-0da9a3f9ac8ada83fa79579455871ec59f11db72.zip
Merge branch 'fixes' into 'for-next'
Merged the 'fixes' branch into the 'for-next' branch to resolve a conflict in alienware-wmi zone teardown code.
Diffstat (limited to 'drivers/platform/x86/dell/alienware-wmi.c')
-rw-r--r--drivers/platform/x86/dell/alienware-wmi.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
index 63cf016bc912..e252e0cf47ef 100644
--- a/drivers/platform/x86/dell/alienware-wmi.c
+++ b/drivers/platform/x86/dell/alienware-wmi.c
@@ -190,7 +190,7 @@ static struct quirk_entry quirk_asm201 = {
};
static struct quirk_entry quirk_g_series = {
- .num_zones = 2,
+ .num_zones = 0,
.hdmi_mux = 0,
.amplifier = 0,
.deepslp = 0,
@@ -199,7 +199,7 @@ static struct quirk_entry quirk_g_series = {
};
static struct quirk_entry quirk_x_series = {
- .num_zones = 2,
+ .num_zones = 0,
.hdmi_mux = 0,
.amplifier = 0,
.deepslp = 0,
@@ -243,6 +243,15 @@ static const struct dmi_system_id alienware_quirks[] __initconst = {
},
{
.callback = dmi_matched,
+ .ident = "Alienware m16 R1 AMD",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
+ },
+ .driver_data = &quirk_x_series,
+ },
+ {
+ .callback = dmi_matched,
.ident = "Alienware m17 R5",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
@@ -689,6 +698,9 @@ static int alienware_zone_init(struct platform_device *dev)
static void alienware_zone_exit(struct platform_device *dev)
{
+ if (!quirks->num_zones)
+ return;
+
led_classdev_unregister(&global_led);
}
@@ -1205,9 +1217,11 @@ static int __init alienware_wmi_init(void)
goto fail_prep_thermal_profile;
}
- ret = alienware_zone_init(platform_device);
- if (ret)
- goto fail_prep_zones;
+ if (quirks->num_zones > 0) {
+ ret = alienware_zone_init(platform_device);
+ if (ret)
+ goto fail_prep_zones;
+ }
return 0;