Skip to content
Commit 9d56653d authored by Jiaxun Yang's avatar Jiaxun Yang Committed by Rafael J. Wysocki
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
[ hdegoede@redhat.com: Also remove const from platform_profile_register() ]
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a2ff95e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment