aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/power_allocator.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2019-06-12 22:13:25 +0200
committerZhang Rui <rui.zhang@intel.com>2019-06-27 21:22:14 +0800
commit57c5b2ec905933da84fe77b2b54619567ac21297 (patch)
tree15f05271697560290ac97107e03a4c17f7c4ac7f /drivers/thermal/power_allocator.c
parentthermal/drivers/core: Add init section table for self-encapsulation (diff)
downloadlinux-dev-57c5b2ec905933da84fe77b2b54619567ac21297.tar.xz
linux-dev-57c5b2ec905933da84fe77b2b54619567ac21297.zip
thermal/drivers/core: Use governor table to initialize
Now that the governor table is in place and the macro allows to browse the table, declare the governor so the entry is added in the governor table in the init section. The [un]register_thermal_governors function does no longer need to use the exported [un]register thermal governor's specific function which in turn call the [un]register_thermal_governor. The governors are fully self-encapsulated. The cyclic dependency is no longer needed, remove it. Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/power_allocator.c')
-rw-r--r--drivers/thermal/power_allocator.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c
index 3055f9a12a17..44636475b2a3 100644
--- a/drivers/thermal/power_allocator.c
+++ b/drivers/thermal/power_allocator.c
@@ -651,13 +651,4 @@ static struct thermal_governor thermal_gov_power_allocator = {
.unbind_from_tz = power_allocator_unbind,
.throttle = power_allocator_throttle,
};
-
-int thermal_gov_power_allocator_register(void)
-{
- return thermal_register_governor(&thermal_gov_power_allocator);
-}
-
-void thermal_gov_power_allocator_unregister(void)
-{
- thermal_unregister_governor(&thermal_gov_power_allocator);
-}
+THERMAL_GOVERNOR_DECLARE(thermal_gov_power_allocator);