[PATCH v4 04/12] platform/x86: alienware-wmi-wmax: Modify supported_thermal_profiles[]

Kurt Borja
2025-03-08T20:23:54Z

Rename supported_thermal_profiles[] -> supported_profiles[] and change
it's type to u8 because it stores AWCC thermal IDs.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
drivers/platform/x86/dell/alienware-wmi-wmax.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/dell/alienware-wmi-wmax.c b/drivers/platform/x86/dell/alienware-wmi-wmax.c
index b9dbfdc8096c571722b3c7ac3e73989e235e2eb9..a8a13779793abbcc8d1263474cac6227d524a6f5 100644
--- a/drivers/platform/x86/dell/alienware-wmi-wmax.c
+++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c
@@ -213,7 +213,7 @@ struct wmax_u32_args {
struct awcc_priv {
struct wmi_device *wdev;
struct device *ppdev;
- enum awcc_thermal_profile supported_thermal_profiles[PLATFORM_PROFILE_LAST];
+ u8 supported_profiles[PLATFORM_PROFILE_LAST];
};

static const enum platform_profile_option awcc_mode_to_platform_profile[AWCC_PROFILE_LAST] = {
@@ -616,8 +616,7 @@ static int awcc_platform_profile_set(struct device *dev,
}
}

- return awcc_op_activate_profile(priv->wdev,
- priv->supported_thermal_profiles[profile]);
+ return awcc_op_activate_profile(priv->wdev, priv->supported_profiles[profile]);
}

static int awcc_platform_profile_probe(void *drvdata, unsigned long *choices)
@@ -653,7 +652,7 @@ static int awcc_platform_profile_probe(void *drvdata, unsigned long *choices)

mode = FIELD_GET(AWCC_THERMAL_MODE_MASK, id);
profile = awcc_mode_to_platform_profile[mode];
- priv->supported_thermal_profiles[profile] = id;
+ priv->supported_profiles[profile] = id;

set_bit(profile, choices);
}
@@ -662,7 +661,7 @@ static int awcc_platform_profile_probe(void *drvdata, unsigned long *choices)
return -ENODEV;

if (awcc->gmode) {
- priv->supported_thermal_profiles[PLATFORM_PROFILE_PERFORMANCE] =
+ priv->supported_profiles[PLATFORM_PROFILE_PERFORMANCE] =
AWCC_THERMAL_MODE_GMODE;

set_bit(PLATFORM_PROFILE_PERFORMANCE, choices);

--
2.48.1