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>
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;
if (!priv->dytc)
return;
- platform_profile_remove(&priv->dytc->pprof);
mutex_destroy(&priv->dytc->mutex);
kfree(priv->dytc);