summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorKurt Borja <kuurtb@gmail.com>2025-01-15 19:27:06 -0500
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-01-16 17:26:28 +0200
commitb5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 (patch)
tree6b4b655c813729e556f91949d137224520ef4511 /drivers/acpi
parentcf3ea098dd3af415f079bc0b999055f213dd4a83 (diff)
downloadlinux-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.tar.gz
linux-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.tar.bz2
linux-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.zip
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/acpi')
-rw-r--r--drivers/acpi/platform_profile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index bd90aa4e8371..161a05d57b0f 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -65,7 +65,7 @@ static int _store_class_profile(struct device *dev, void *data)
if (!test_bit(*bit, handler->choices))
return -EOPNOTSUPP;
- return handler->profile_set(dev, *bit);
+ return handler->ops->profile_set(dev, *bit);
}
/**
@@ -102,7 +102,7 @@ static int get_class_profile(struct device *dev,
lockdep_assert_held(&profile_lock);
handler = to_pprof_handler(dev);
- err = handler->profile_get(dev, &val);
+ err = handler->ops->profile_get(dev, &val);
if (err) {
pr_err("Failed to get profile for handler %s\n", handler->name);
return err;
@@ -466,7 +466,7 @@ int platform_profile_register(struct platform_profile_handler *pprof, void *drvd
/* Sanity check the profile handler */
if (!pprof || bitmap_empty(pprof->choices, PLATFORM_PROFILE_LAST) ||
- !pprof->profile_set || !pprof->profile_get) {
+ !pprof->ops->profile_set || !pprof->ops->profile_get) {
pr_err("platform_profile: handler is invalid\n");
return -EINVAL;
}