diff options
| author | Kurt Borja <kuurtb@gmail.com> | 2025-01-16 03:27:06 +0300 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-01-16 18:26:28 +0300 |
| commit | b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 (patch) | |
| tree | 6b4b655c813729e556f91949d137224520ef4511 /include | |
| parent | cf3ea098dd3af415f079bc0b999055f213dd4a83 (diff) | |
| download | linux-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.tar.xz | |
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 'include')
| -rw-r--r-- | include/linux/platform_profile.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h index 5296d886c243..6013c05d7b86 100644 --- a/include/linux/platform_profile.h +++ b/include/linux/platform_profile.h @@ -28,14 +28,20 @@ enum platform_profile_option { PLATFORM_PROFILE_LAST, /*must always be last */ }; +struct platform_profile_handler; + +struct platform_profile_ops { + int (*profile_get)(struct device *dev, enum platform_profile_option *profile); + int (*profile_set)(struct device *dev, enum platform_profile_option profile); +}; + struct platform_profile_handler { const char *name; struct device *dev; struct device class_dev; int minor; unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)]; - int (*profile_get)(struct device *dev, enum platform_profile_option *profile); - int (*profile_set)(struct device *dev, enum platform_profile_option profile); + const struct platform_profile_ops *ops; }; int platform_profile_register(struct platform_profile_handler *pprof, void *drvdata); |
