lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250114153726.11802-9-kuurtb@gmail.com>
Date: Tue, 14 Jan 2025 10:37:16 -0500
From: Kurt Borja <kuurtb@...il.com>
To: platform-driver-x86@...r.kernel.org
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	"Len Brown" <lenb@...nel.org>,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"Mario Limonciello" <mario.limonciello@....com>,
	"Armin Wolf" <W_Armin@....de>,
	"Joshua Grisham" <josh@...huagrisham.com>,
	"Derek J. Clark" <derekjohn.clark@...il.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	"Hans de Goede" <hdegoede@...hat.com>,
	"Kurt Borja" <kuurtb@...il.com>,
	"Maximilian Luz" <luzmaximilian@...il.com>,
	"Lee, Chun-Yi" <jlee@...e.com>,
	"Shyam Sundar S K" <Shyam-sundar.S-k@....com>,
	"Corentin Chary" <corentin.chary@...il.com>,
	"Luke D. Jones" <luke@...nes.dev>,
	"Lyndon Sanche" <lsanche@...deno.ca>,
	"Ike Panhc" <ike.pan@...onical.com>,
	"Henrique de Moraes Holschuh" <hmh@....eng.br>,
	"Mark Pearson" <mpearson-lenovo@...ebb.ca>,
	"Alexis Belmonte" <alexbelm48@...il.com>,
	"Ai Chao" <aichao@...inos.cn>,
	"Gergo Koteles" <soyer@....hu>,
	Dell.Client.Kernel@...l.com,
	ibm-acpi-devel@...ts.sourceforge.net
Subject: [PATCH v2 08/18] platform/x86: amd: pmf: sps: Use devm_platform_profile_register()

Replace platform_profile_register() with it's device managed version.

Reviewed-by: Mario Limonciello <mario.limonciello@....com>
Signed-off-by: Kurt Borja <kuurtb@...il.com>
---
 drivers/platform/x86/amd/pmf/core.c | 1 -
 drivers/platform/x86/amd/pmf/pmf.h  | 1 -
 drivers/platform/x86/amd/pmf/sps.c  | 7 +------
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index 57ee95a327be..1211a753fee8 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -371,7 +371,6 @@ static void amd_pmf_deinit_features(struct amd_pmf_dev *dev)
 	if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR) ||
 	    is_apmf_func_supported(dev, APMF_FUNC_OS_POWER_SLIDER_UPDATE)) {
 		power_supply_unreg_notifier(&dev->pwr_src_notifier);
-		amd_pmf_deinit_sps(dev);
 	}
 
 	if (dev->smart_pc_enabled) {
diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h
index 080818dd173b..d99b3556205b 100644
--- a/drivers/platform/x86/amd/pmf/pmf.h
+++ b/drivers/platform/x86/amd/pmf/pmf.h
@@ -780,7 +780,6 @@ int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);
 void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx,
 			   struct amd_pmf_static_slider_granular *table);
 int amd_pmf_init_sps(struct amd_pmf_dev *dev);
-void amd_pmf_deinit_sps(struct amd_pmf_dev *dev);
 int apmf_get_static_slider_granular(struct amd_pmf_dev *pdev,
 				    struct apmf_static_slider_granular_output *output);
 bool is_pprof_balanced(struct amd_pmf_dev *pmf);
diff --git a/drivers/platform/x86/amd/pmf/sps.c b/drivers/platform/x86/amd/pmf/sps.c
index e710405b581f..7c7ed2b9de01 100644
--- a/drivers/platform/x86/amd/pmf/sps.c
+++ b/drivers/platform/x86/amd/pmf/sps.c
@@ -425,15 +425,10 @@ int amd_pmf_init_sps(struct amd_pmf_dev *dev)
 	dev->pprof.ops = &amd_pmf_profile_ops;
 
 	/* Create platform_profile structure and register */
-	err = platform_profile_register(&dev->pprof, dev);
+	err = devm_platform_profile_register(&dev->pprof, dev);
 	if (err)
 		dev_err(dev->dev, "Failed to register SPS support, this is most likely an SBIOS bug: %d\n",
 			err);
 
 	return err;
 }
-
-void amd_pmf_deinit_sps(struct amd_pmf_dev *dev)
-{
-	platform_profile_remove(&dev->pprof);
-}
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ