summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2023-04-04 10:51:36 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-04-07 19:36:28 +0300
commitac614a9b4c35bf766dec40d73cbbc7f37c1734f7 (patch)
tree7928756e0a35784346dcd1fc3282af96013401fa /drivers/thermal
parent8454c8c09c7768fd86cda61f1a07b9c746050c80 (diff)
downloadlinux-ac614a9b4c35bf766dec40d73cbbc7f37c1734f7.tar.xz
thermal/of: Unexport unused OF functions
The functions thermal_of_zone_register() and thermal_of_zone_unregister() are no longer needed from the drivers as the devm_ variant is always used. Make them static in the C file and remove their declaration from thermal.h Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230404075138.2914680-2-daniel.lezcano@linaro.org
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_of.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index ff4d12ef51bc..6fb14e521197 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -439,7 +439,7 @@ static int thermal_of_unbind(struct thermal_zone_device *tz,
*
* @tz: a pointer to the thermal zone structure
*/
-void thermal_of_zone_unregister(struct thermal_zone_device *tz)
+static void thermal_of_zone_unregister(struct thermal_zone_device *tz)
{
struct thermal_trip *trips = tz->trips;
struct thermal_zone_params *tzp = tz->tzp;
@@ -451,7 +451,6 @@ void thermal_of_zone_unregister(struct thermal_zone_device *tz)
kfree(tzp);
kfree(ops);
}
-EXPORT_SYMBOL_GPL(thermal_of_zone_unregister);
/**
* thermal_of_zone_register - Register a thermal zone with device node
@@ -473,8 +472,8 @@ EXPORT_SYMBOL_GPL(thermal_of_zone_unregister);
* - ENOMEM: if one structure can not be allocated
* - Other negative errors are returned by the underlying called functions
*/
-struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, int id, void *data,
- const struct thermal_zone_device_ops *ops)
+static struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, int id, void *data,
+ const struct thermal_zone_device_ops *ops)
{
struct thermal_zone_device *tz;
struct thermal_trip *trips;
@@ -550,7 +549,6 @@ out_kfree_of_ops:
return ERR_PTR(ret);
}
-EXPORT_SYMBOL_GPL(thermal_of_zone_register);
static void devm_thermal_of_zone_release(struct device *dev, void *res)
{