summaryrefslogtreecommitdiff
path: root/include/linux/platform_profile.h
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2021-01-25 14:59:56 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-01-25 19:30:10 +0300
commit9d56653d14cd5e545599cd9e3013daa17df50cd4 (patch)
tree2484fbb08af102b92030d6a1cb4768647f07c316 /include/linux/platform_profile.h
parenta2ff95e018f1d2bc816f3078d5110a655e355f18 (diff)
downloadlinux-9d56653d14cd5e545599cd9e3013daa17df50cd4.tar.xz
ACPI: platform-profile: Drop const qualifier for cur_profile
Drop the const qualifier from the static global cur_profile pointer declaration. This is a preparation patch for passing the cur_profile pointer as parameter to the profile_get() and profile_set() callbacks so that drivers dynamically allocating their driver-data struct, with their platform_profile_handler struct embedded, can use this pointer to get to their driver-data. Note this also requires dropping the const from the pprof platform_profile_register() function argument. Dropping this const is not a problem, non of the queued up consumers of platform_profile_register() actually pass in a const pointer. Link: https://lore.kernel.org/linux-acpi/5e7a4d87-52ef-e487-9cc2-8e7094beaa08@redhat.com/ Link: https://lore.kernel.org/r/20210114073429.176462-2-jiaxun.yang@flygoat.com Suggested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> [ hdegoede@redhat.com: Also remove const from platform_profile_register() ] 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
index 3623d7108421..c797fdb3d91a 100644
--- a/include/linux/platform_profile.h
+++ b/include/linux/platform_profile.h
@@ -32,7 +32,7 @@ struct platform_profile_handler {
int (*profile_set)(enum platform_profile_option profile);
};
-int platform_profile_register(const struct platform_profile_handler *pprof);
+int platform_profile_register(struct platform_profile_handler *pprof);
int platform_profile_remove(void);
void platform_profile_notify(void);