Skip to content

Commit

Permalink
thermal/drivers/core: Remove module unload code
Browse files Browse the repository at this point in the history
Now the thermal core is no longer compiled as a module. Remove the
unloading module code and move the unregister function to the __init
section.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
  • Loading branch information
Daniel Lezcano authored and Zhang Rui committed May 6, 2019
1 parent 554b352 commit 77e1dd4
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions drivers/thermal/thermal_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static int __init thermal_register_governors(void)
return thermal_gov_power_allocator_register();
}

static void thermal_unregister_governors(void)
static void __init thermal_unregister_governors(void)
{
thermal_gov_step_wise_unregister();
thermal_gov_fair_share_unregister();
Expand Down Expand Up @@ -1563,19 +1563,4 @@ static int __init thermal_init(void)
mutex_destroy(&poweroff_lock);
return result;
}

static void __exit thermal_exit(void)
{
unregister_pm_notifier(&thermal_pm_nb);
of_thermal_destroy_zones();
genetlink_exit();
class_unregister(&thermal_class);
thermal_unregister_governors();
ida_destroy(&thermal_tz_ida);
ida_destroy(&thermal_cdev_ida);
mutex_destroy(&thermal_list_lock);
mutex_destroy(&thermal_governor_lock);
}

fs_initcall(thermal_init);
module_exit(thermal_exit);

0 comments on commit 77e1dd4

Please sign in to comment.