diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-03-26 16:38:29 +0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-04-14 23:28:43 +0800 |
commit | 80a26a5c22b90a82b8696cb72c1d09d525ada53e (patch) | |
tree | 4ab06fb87e9e3e6364ad234b0594f6ac40227cdc /drivers/thermal/step_wise.c | |
parent | 5fc024ab474de7d5798b7ad85f3df260dbab1353 (diff) |
Thermal: build thermal governors into thermal_sys module
The thermal governors are part of the thermal framework,
rather than a seperate feature/module.
Because the generic thermal layer can not work without
thermal governors, and it must load the thermal governors
during its initialization.
Build them into one module in this patch.
This also fix a problem that the generic thermal layer does not
work when CONFIG_THERMAL=m and CONFIG_THERMAL_GOV_XXX=y.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Diffstat (limited to 'drivers/thermal/step_wise.c')
-rw-r--r-- | drivers/thermal/step_wise.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c index ca4f79fb72cf..4d4ddae1a991 100644 --- a/drivers/thermal/step_wise.c +++ b/drivers/thermal/step_wise.c @@ -22,9 +22,6 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include <linux/module.h> #include <linux/thermal.h> #include "thermal_core.h" @@ -186,23 +183,14 @@ static int step_wise_throttle(struct thermal_zone_device *tz, int trip) static struct thermal_governor thermal_gov_step_wise = { .name = "step_wise", .throttle = step_wise_throttle, - .owner = THIS_MODULE, }; -static int __init thermal_gov_step_wise_init(void) +int thermal_gov_step_wise_register(void) { return thermal_register_governor(&thermal_gov_step_wise); } -static void __exit thermal_gov_step_wise_exit(void) +void thermal_gov_step_wise_unregister(void) { thermal_unregister_governor(&thermal_gov_step_wise); } - -/* This should load after thermal framework */ -fs_initcall(thermal_gov_step_wise_init); -module_exit(thermal_gov_step_wise_exit); - -MODULE_AUTHOR("Durgadoss R"); -MODULE_DESCRIPTION("A step-by-step thermal throttling governor"); -MODULE_LICENSE("GPL"); |