diff options
| author | Kurt Borja <[email protected]> | 2025-01-16 00:27:06 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-01-16 15:26:28 +0000 |
| commit | b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3 (patch) | |
| tree | 6b4b655c813729e556f91949d137224520ef4511 /drivers/platform/x86/acer-wmi.c | |
| parent | ACPI: platform_profile: Remove platform_profile_handler from callbacks (diff) | |
| download | kernel-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.tar.gz kernel-b5ca1a4488a5e6dfb9962e2319c03c7414e50ec3.zip | |
ACPI: platform_profile: Add `ops` member to handlers
Replace *profile_get and *profile_set members with a general *ops
member.
Reviewed-by: Mario Limonciello <[email protected]>
Signed-off-by: Kurt Borja <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Tested-by: Mark Pearson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/x86/acer-wmi.c')
| -rw-r--r-- | drivers/platform/x86/acer-wmi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index c68c0d744a69..63e6bd1fe339 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -2019,6 +2019,11 @@ acer_predator_v4_platform_profile_set(struct device *dev, return 0; } +static const struct platform_profile_ops acer_predator_v4_platform_profile_ops = { + .profile_get = acer_predator_v4_platform_profile_get, + .profile_set = acer_predator_v4_platform_profile_set, +}; + static int acer_platform_profile_setup(struct platform_device *device) { if (quirks->predator_v4) { @@ -2027,10 +2032,8 @@ static int acer_platform_profile_setup(struct platform_device *device) platform_profile_handler.name = "acer-wmi"; platform_profile_handler.dev = &device->dev; - platform_profile_handler.profile_get = - acer_predator_v4_platform_profile_get; - platform_profile_handler.profile_set = - acer_predator_v4_platform_profile_set; + platform_profile_handler.ops = + &acer_predator_v4_platform_profile_ops; err = WMID_gaming_get_misc_setting(ACER_WMID_MISC_SETTING_SUPPORTED_PROFILES, (u8 *)&supported_profiles); |
