Skip to content

Commit 9523ea9

Browse files
kuu-rtij-intel
authored andcommitted
platform/x86: acer-wmi: Use devm_platform_profile_register()
Replace platform_profile_register() with it's device managed version. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20250116002721.75592-8-kuurtb@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 24c54b1 commit 9523ea9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/platform/x86/acer-wmi.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,7 +2080,7 @@ static int acer_platform_profile_setup(struct platform_device *device)
20802080
platform_profile_handler.ops =
20812081
&acer_predator_v4_platform_profile_ops;
20822082

2083-
err = platform_profile_register(&platform_profile_handler, NULL);
2083+
err = devm_platform_profile_register(&platform_profile_handler, NULL);
20842084
if (err)
20852085
return err;
20862086

@@ -2684,8 +2684,6 @@ static int acer_platform_probe(struct platform_device *device)
26842684
return 0;
26852685

26862686
error_hwmon:
2687-
if (platform_profile_support)
2688-
platform_profile_remove(&platform_profile_handler);
26892687
error_platform_profile:
26902688
acer_rfkill_exit();
26912689
error_rfkill:
@@ -2706,9 +2704,6 @@ static void acer_platform_remove(struct platform_device *device)
27062704
acer_backlight_exit();
27072705

27082706
acer_rfkill_exit();
2709-
2710-
if (platform_profile_support)
2711-
platform_profile_remove(&platform_profile_handler);
27122707
}
27132708

27142709
#ifdef CONFIG_PM_SLEEP

0 commit comments

Comments
 (0)