aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/platform_profile.c
diff options
context:
space:
mode:
authorKurt Borja <[email protected]>2025-01-16 00:27:06 +0000
committerIlpo Järvinen <[email protected]>2025-01-16 15:26:28 +0000
commitb5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 (patch)
tree6b4b655c813729e556f91949d137224520ef4511 /drivers/acpi/platform_profile.c
parentACPI: platform_profile: Remove platform_profile_handler from callbacks (diff)
downloadkernel-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.tar.gz
kernel-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 <[email protected]> Signed-off-by: Kurt Borja <[email protected]> Reviewed-by: Mark Pearson <[email protected]> Tested-by: Mark Pearson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/acpi/platform_profile.c')
-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;
}