Skip to content

Commit c1043cd

Browse files
kuu-rtij-intel
authored andcommitted
alienware-wmi: Fix X Series and G Series quirks
Devices that are known to support the WMI thermal interface do not support the legacy LED control interface. Make `.num_zones = 0` and avoid calling alienware_zone_init() if that's the case. Fixes: 9f6c430 ("alienware-wmi: added platform profile support") Fixes: 1c1eb70 ("alienware-wmi: extends the list of supported models") Suggested-by: Armin Wolf <[email protected]> Reviewed-by: Armin Wolf <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent e9fba20 commit c1043cd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

drivers/platform/x86/dell/alienware-wmi.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static struct quirk_entry quirk_asm201 = {
190190
};
191191

192192
static struct quirk_entry quirk_g_series = {
193-
.num_zones = 2,
193+
.num_zones = 0,
194194
.hdmi_mux = 0,
195195
.amplifier = 0,
196196
.deepslp = 0,
@@ -199,7 +199,7 @@ static struct quirk_entry quirk_g_series = {
199199
};
200200

201201
static struct quirk_entry quirk_x_series = {
202-
.num_zones = 2,
202+
.num_zones = 0,
203203
.hdmi_mux = 0,
204204
.amplifier = 0,
205205
.deepslp = 0,
@@ -687,6 +687,9 @@ static void alienware_zone_exit(struct platform_device *dev)
687687
{
688688
u8 zone;
689689

690+
if (!quirks->num_zones)
691+
return;
692+
690693
sysfs_remove_group(&dev->dev.kobj, &zone_attribute_group);
691694
led_classdev_unregister(&global_led);
692695
if (zone_dev_attrs) {
@@ -1229,9 +1232,11 @@ static int __init alienware_wmi_init(void)
12291232
goto fail_prep_thermal_profile;
12301233
}
12311234

1232-
ret = alienware_zone_init(platform_device);
1233-
if (ret)
1234-
goto fail_prep_zones;
1235+
if (quirks->num_zones > 0) {
1236+
ret = alienware_zone_init(platform_device);
1237+
if (ret)
1238+
goto fail_prep_zones;
1239+
}
12351240

12361241
return 0;
12371242

0 commit comments

Comments
 (0)