Skip to content

Commit 3e6d0bf

Browse files
kuu-rtij-intel
authored andcommitted
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@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-9-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 9523ea9 commit 3e6d0bf

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

drivers/platform/x86/amd/pmf/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ static void amd_pmf_deinit_features(struct amd_pmf_dev *dev)
371371
if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR) ||
372372
is_apmf_func_supported(dev, APMF_FUNC_OS_POWER_SLIDER_UPDATE)) {
373373
power_supply_unreg_notifier(&dev->pwr_src_notifier);
374-
amd_pmf_deinit_sps(dev);
375374
}
376375

377376
if (dev->smart_pc_enabled) {

drivers/platform/x86/amd/pmf/pmf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,6 @@ int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);
780780
void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx,
781781
struct amd_pmf_static_slider_granular *table);
782782
int amd_pmf_init_sps(struct amd_pmf_dev *dev);
783-
void amd_pmf_deinit_sps(struct amd_pmf_dev *dev);
784783
int apmf_get_static_slider_granular(struct amd_pmf_dev *pdev,
785784
struct apmf_static_slider_granular_output *output);
786785
bool is_pprof_balanced(struct amd_pmf_dev *pmf);

drivers/platform/x86/amd/pmf/sps.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,10 @@ int amd_pmf_init_sps(struct amd_pmf_dev *dev)
425425
dev->pprof.ops = &amd_pmf_profile_ops;
426426

427427
/* Create platform_profile structure and register */
428-
err = platform_profile_register(&dev->pprof, dev);
428+
err = devm_platform_profile_register(&dev->pprof, dev);
429429
if (err)
430430
dev_err(dev->dev, "Failed to register SPS support, this is most likely an SBIOS bug: %d\n",
431431
err);
432432

433433
return err;
434434
}
435-
436-
void amd_pmf_deinit_sps(struct amd_pmf_dev *dev)
437-
{
438-
platform_profile_remove(&dev->pprof);
439-
}

0 commit comments

Comments
 (0)