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 <[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]>
1 parent 8f18685 commit 1ab2081

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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)