summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/amd/pmf/sps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/amd/pmf/sps.c')
-rw-r--r--drivers/platform/x86/amd/pmf/sps.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/x86/amd/pmf/sps.c b/drivers/platform/x86/amd/pmf/sps.c
index cf2e51f67787..6ae82ae86d22 100644
--- a/drivers/platform/x86/amd/pmf/sps.c
+++ b/drivers/platform/x86/amd/pmf/sps.c
@@ -387,6 +387,11 @@ static int amd_pmf_profile_set(struct device *dev,
return 0;
}
+static const struct platform_profile_ops amd_pmf_profile_ops = {
+ .profile_get = amd_pmf_profile_get,
+ .profile_set = amd_pmf_profile_set,
+};
+
int amd_pmf_init_sps(struct amd_pmf_dev *dev)
{
int err;
@@ -407,8 +412,7 @@ int amd_pmf_init_sps(struct amd_pmf_dev *dev)
dev->pprof.name = "amd-pmf";
dev->pprof.dev = dev->dev;
- dev->pprof.profile_get = amd_pmf_profile_get;
- dev->pprof.profile_set = amd_pmf_profile_set;
+ dev->pprof.ops = &amd_pmf_profile_ops;
/* Setup supported modes */
set_bit(PLATFORM_PROFILE_LOW_POWER, dev->pprof.choices);