diff options
| author | Kurt Borja <kuurtb@gmail.com> | 2024-12-24 17:01:33 +0300 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-12-30 21:22:55 +0300 |
| commit | 6b228cfc52a6e9b7149cf51e247076963d6561cd (patch) | |
| tree | 12eeca42bd10a62d4d8c8a25239208aab8e085e5 | |
| parent | c416a3fed78b9b1d93755d2c5d8104769559c4cb (diff) | |
| download | linux-6b228cfc52a6e9b7149cf51e247076963d6561cd.tar.xz | |
alienware-wmi: Use devm_platform_profile_register()
Replace platform_profile_register() with it's device managed version.
Drop remove_thermal_profile() because it's no longer needed.
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20241224140131.30362-5-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
| -rw-r--r-- | drivers/platform/x86/dell/alienware-wmi.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c index e95d22c7b60c..7b3ee2d6a23d 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -1159,13 +1159,7 @@ static int create_thermal_profile(struct platform_device *platform_device) pp_handler.name = "alienware-wmi"; pp_handler.dev = &platform_device->dev; - return platform_profile_register(&pp_handler); -} - -static void remove_thermal_profile(void) -{ - if (quirks->thermal) - platform_profile_remove(&pp_handler); + return devm_platform_profile_register(&pp_handler); } static int __init alienware_wmi_init(void) @@ -1239,7 +1233,6 @@ static int __init alienware_wmi_init(void) fail_prep_zones: alienware_zone_exit(platform_device); - remove_thermal_profile(); fail_prep_thermal_profile: fail_prep_deepsleep: fail_prep_amplifier: @@ -1260,7 +1253,6 @@ static void __exit alienware_wmi_exit(void) if (platform_device) { alienware_zone_exit(platform_device); remove_hdmi(platform_device); - remove_thermal_profile(); platform_device_unregister(platform_device); platform_driver_unregister(&platform_driver); } |
