Re: [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 12.07.24 um 19:26 schrieb Alexis Belmonte:

Fix ill-formed implementation of the platform_profile_omen_get function
introduced by patch "platform/x86: hp-wmi: Fix platform profile option
switch"

Signed-off-by: Alexis Belmonte <alexbelm48@xxxxxxxxx>
---
  drivers/platform/x86/hp/hp-wmi.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index c8bcb3e2b344..876e0a97cee1 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -1238,8 +1238,6 @@ static int platform_profile_omen_get_ec(enum platform_profile_option *profile)
  static int platform_profile_omen_get(struct platform_profile_handler *pprof,
  				     enum platform_profile_option *profile)
  {
-	enum platform_profile_option selected_platform_profile;
-
  	/*
  	 * We directly return the stored platform profile, as the embedded
  	 * controller will not accept switching to the performance option when
@@ -1253,9 +1251,9 @@ static int platform_profile_omen_get(struct platform_profile_handler *pprof,
  	 * See also omen_powersource_event.
  	 */
  	guard(mutex)(&active_platform_profile_lock);
-	selected_platform_profile = active_platform_profile;
+	*profile = active_platform_profile;

-	return selected_platform_profile;
+	return 0;
  }

  static bool has_omen_thermal_profile_ec_timer(void)

Looks good to me.

Reviewed-by: Armin Wolf <W_Armin@xxxxxx>






[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux