hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/thermal/gov_bang_bang.c
....@@ -1,22 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * gov_bang_bang.c - A simple thermal throttling governor using hysteresis
34 *
4
- * Copyright (C) 2014 Peter Feuerer <peter@piie.net>
5
+ * Copyright (C) 2014 Peter Kaestle <peter@piie.net>
56 *
67 * Based on step_wise.c with following Copyrights:
78 * Copyright (C) 2012 Intel Corp
89 * Copyright (C) 2012 Durgadoss R <durgadoss.r@intel.com>
9
- *
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation, version 2.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
18
- * the GNU General Public License for more details.
19
- *
2010 */
2111
2212 #include <linux/thermal.h>
....@@ -81,8 +71,8 @@
8171
8272 /**
8373 * bang_bang_control - controls devices associated with the given zone
84
- * @tz - thermal_zone_device
85
- * @trip - the trip point
74
+ * @tz: thermal_zone_device
75
+ * @trip: the trip point
8676 *
8777 * Regulation Logic: a two point regulation, deliver cooling state depending
8878 * on the previous state shown in this diagram:
....@@ -126,13 +116,4 @@
126116 .name = "bang_bang",
127117 .throttle = bang_bang_control,
128118 };
129
-
130
-int thermal_gov_bang_bang_register(void)
131
-{
132
- return thermal_register_governor(&thermal_gov_bang_bang);
133
-}
134
-
135
-void thermal_gov_bang_bang_unregister(void)
136
-{
137
- thermal_unregister_governor(&thermal_gov_bang_bang);
138
-}
119
+THERMAL_GOVERNOR_DECLARE(thermal_gov_bang_bang);