mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
9d56653d14
commit
84f9017c37
2 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue