diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-04-02 12:12:45 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2019-05-06 08:35:24 -0400 |
commit | 77e1dd46a1ad098f2bdb1fc953fea0d59e5d7fb6 (patch) | |
tree | 5985512785b7627b4ce3c601e3c64dea85404d9b | |
parent | 554b3529fe018e74cb5d0d0f476ee793b58b030a (diff) |
thermal/drivers/core: Remove module unload code
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>
-rw-r--r-- | drivers/thermal/thermal_core.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6590bb5cb688..28f7ece0e8fe 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
@@ -266,7 +266,7 @@ static int __init thermal_register_governors(void) | |||
266 | return thermal_gov_power_allocator_register(); | 266 | return thermal_gov_power_allocator_register(); |
267 | } | 267 | } |
268 | 268 | ||
269 | static void thermal_unregister_governors(void) | 269 | static void __init thermal_unregister_governors(void) |
270 | { | 270 | { |
271 | thermal_gov_step_wise_unregister(); | 271 | thermal_gov_step_wise_unregister(); |
272 | thermal_gov_fair_share_unregister(); | 272 | thermal_gov_fair_share_unregister(); |
@@ -1563,19 +1563,4 @@ error: | |||
1563 | mutex_destroy(&poweroff_lock); | 1563 | mutex_destroy(&poweroff_lock); |
1564 | return result; | 1564 | return result; |
1565 | } | 1565 | } |
1566 | |||
1567 | static void __exit thermal_exit(void) | ||
1568 | { | ||
1569 | unregister_pm_notifier(&thermal_pm_nb); | ||
1570 | of_thermal_destroy_zones(); | ||
1571 | genetlink_exit(); | ||
1572 | class_unregister(&thermal_class); | ||
1573 | thermal_unregister_governors(); | ||
1574 | ida_destroy(&thermal_tz_ida); | ||
1575 | ida_destroy(&thermal_cdev_ida); | ||
1576 | mutex_destroy(&thermal_list_lock); | ||
1577 | mutex_destroy(&thermal_governor_lock); | ||
1578 | } | ||
1579 | |||
1580 | fs_initcall(thermal_init); | 1566 | fs_initcall(thermal_init); |
1581 | module_exit(thermal_exit); | ||