diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2021-01-25 14:59:57 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-01-27 20:45:29 +0300 |
commit | 84f9017c37c479c4f70456a645d24d2296ad2208 (patch) | |
tree | b55c7dcf406ce8513023c90ad1a5f32e44998234 /include/linux/platform_profile.h | |
parent | 9d56653d14cd5e545599cd9e3013daa17df50cd4 (diff) | |
download | linux-84f9017c37c479c4f70456a645d24d2296ad2208.tar.xz |
ACPI: platform-profile: Introduce object pointers to callbacks
Add an object pointer to handler callbacks to avoid the need for
drivers to have a global variable to get to their driver-data
struct.
Link: https://lore.kernel.org/linux-acpi/6a29f338-d9e4-150c-81dd-2ffb54f5bc35@redhat.com/
Link: https://lore.kernel.org/r/20210114073429.176462-3-jiaxun.yang@flygoat.com
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/platform_profile.h')
-rw-r--r-- | include/linux/platform_profile.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h index c797fdb3d91a..a26542d53058 100644 --- a/include/linux/platform_profile.h +++ b/include/linux/platform_profile.h @@ -28,8 +28,10 @@ enum platform_profile_option { struct platform_profile_handler { unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)]; - int (*profile_get)(enum platform_profile_option *profile); - int (*profile_set)(enum platform_profile_option profile); + int (*profile_get)(struct platform_profile_handler *pprof, + enum platform_profile_option *profile); + int (*profile_set)(struct platform_profile_handler *pprof, + enum platform_profile_option profile); }; int platform_profile_register(struct platform_profile_handler *pprof); |