summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Borja <kuurtb@gmail.com>2025-01-15 19:27:13 -0500
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-01-16 17:26:40 +0200
commit0d882fae334be3e519290fbb05472b50b698169d (patch)
treef94d1f99beaf931979e01e585f00cb7f294ce24c
parent1ab20816ab0f328a26cdb2467b62e6017fffef5d (diff)
platform/x86: ideapad-laptop: Use devm_platform_profile_register()
Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250116002721.75592-12-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-rw-r--r--drivers/platform/x86/ideapad-laptop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 050919a28d2b..87c1e087770a 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -1123,7 +1123,7 @@ static int ideapad_dytc_profile_init(struct ideapad_private *priv)
priv->dytc->pprof.ops = &dytc_profile_ops;
/* Create platform_profile structure and register */
- err = platform_profile_register(&priv->dytc->pprof, &priv->dytc);
+ err = devm_platform_profile_register(&priv->dytc->pprof, &priv->dytc);
if (err)
goto pp_reg_failed;
@@ -1145,7 +1145,6 @@ static void ideapad_dytc_profile_exit(struct ideapad_private *priv)
if (!priv->dytc)
return;
- platform_profile_remove(&priv->dytc->pprof);
mutex_destroy(&priv->dytc->mutex);
kfree(priv->dytc);