Skip to content

Commit 1ab2081

Browse files
kuu-rtij-intel
authored andcommitted
platform/x86: dell-pc: 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-11-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 8f18685 commit 1ab2081

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/platform/x86/dell/dell-pc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static int thermal_init(void)
281281
thermal_handler->ops = &dell_pc_platform_profile_ops;
282282

283283
/* Clean up if failed */
284-
ret = platform_profile_register(thermal_handler, NULL);
284+
ret = devm_platform_profile_register(thermal_handler, NULL);
285285
if (ret)
286286
goto cleanup_thermal_handler;
287287

@@ -298,8 +298,6 @@ static int thermal_init(void)
298298

299299
static void thermal_cleanup(void)
300300
{
301-
if (thermal_handler)
302-
platform_profile_remove(thermal_handler);
303301
platform_device_unregister(platform_device);
304302
}
305303

0 commit comments

Comments
 (0)