Skip to content

Commit 0d882fa

Browse files
kuu-rtij-intel
authored andcommitted
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>
1 parent 1ab2081 commit 0d882fa

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/platform/x86/ideapad-laptop.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ static int ideapad_dytc_profile_init(struct ideapad_private *priv)
11231123
priv->dytc->pprof.ops = &dytc_profile_ops;
11241124

11251125
/* Create platform_profile structure and register */
1126-
err = platform_profile_register(&priv->dytc->pprof, &priv->dytc);
1126+
err = devm_platform_profile_register(&priv->dytc->pprof, &priv->dytc);
11271127
if (err)
11281128
goto pp_reg_failed;
11291129

@@ -1145,7 +1145,6 @@ static void ideapad_dytc_profile_exit(struct ideapad_private *priv)
11451145
if (!priv->dytc)
11461146
return;
11471147

1148-
platform_profile_remove(&priv->dytc->pprof);
11491148
mutex_destroy(&priv->dytc->mutex);
11501149
kfree(priv->dytc);
11511150

0 commit comments

Comments
 (0)