Message ID | 20241208002652.5885-4-kuurtb@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [v2,1/2] alienware-wmi: Fix X Series and G Series quirks | expand |
On Sat, 07 Dec 2024 21:26:55 -0300, Kurt Borja wrote: > 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. > > Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while. The list of commits applied: [1/2] alienware-wmi: Fix X Series and G Series quirks commit: c1043cdb019ed4d053d673e62b553a5cea1a287d [2/2] alienware-wmi: Adds support to Alienware m16 R1 AMD commit: 54a8cada2f3d7efb4a7920807473d89c442d9c45 -- i.
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c index 77465ed9b449..e69bf9a7b6c8 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, @@ -687,6 +687,9 @@ static void alienware_zone_exit(struct platform_device *dev) { u8 zone; + if (!quirks->num_zones) + return; + sysfs_remove_group(&dev->dev.kobj, &zone_attribute_group); led_classdev_unregister(&global_led); if (zone_dev_attrs) { @@ -1229,9 +1232,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;