diff options
author | Kurt Borja <kuurtb@gmail.com> | 2025-01-15 19:27:06 -0500 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-01-16 17:26:28 +0200 |
commit | b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 (patch) | |
tree | 6b4b655c813729e556f91949d137224520ef4511 /drivers/platform/x86/amd | |
parent | cf3ea098dd3af415f079bc0b999055f213dd4a83 (diff) |
ACPI: platform_profile: Add `ops` member to handlers
Replace *profile_get and *profile_set members with a general *ops
member.
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-5-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/amd')
-rw-r--r-- | drivers/platform/x86/amd/pmf/sps.c | 8 |
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); |