Commit ac614a9b authored by Daniel Lezcano's avatar Daniel Lezcano

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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230404075138.2914680-2-daniel.lezcano@linaro.org
parent 8454c8c0
...@@ -439,7 +439,7 @@ static int thermal_of_unbind(struct thermal_zone_device *tz, ...@@ -439,7 +439,7 @@ static int thermal_of_unbind(struct thermal_zone_device *tz,
* *
* @tz: a pointer to the thermal zone structure * @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_trip *trips = tz->trips;
struct thermal_zone_params *tzp = tz->tzp; struct thermal_zone_params *tzp = tz->tzp;
...@@ -451,7 +451,6 @@ void thermal_of_zone_unregister(struct thermal_zone_device *tz) ...@@ -451,7 +451,6 @@ void thermal_of_zone_unregister(struct thermal_zone_device *tz)
kfree(tzp); kfree(tzp);
kfree(ops); kfree(ops);
} }
EXPORT_SYMBOL_GPL(thermal_of_zone_unregister);
/** /**
* thermal_of_zone_register - Register a thermal zone with device node * thermal_of_zone_register - Register a thermal zone with device node
...@@ -473,7 +472,7 @@ EXPORT_SYMBOL_GPL(thermal_of_zone_unregister); ...@@ -473,7 +472,7 @@ EXPORT_SYMBOL_GPL(thermal_of_zone_unregister);
* - ENOMEM: if one structure can not be allocated * - ENOMEM: if one structure can not be allocated
* - Other negative errors are returned by the underlying called functions * - 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, static struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, int id, void *data,
const struct thermal_zone_device_ops *ops) const struct thermal_zone_device_ops *ops)
{ {
struct thermal_zone_device *tz; struct thermal_zone_device *tz;
...@@ -550,7 +549,6 @@ struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, ...@@ -550,7 +549,6 @@ struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor,
return ERR_PTR(ret); return ERR_PTR(ret);
} }
EXPORT_SYMBOL_GPL(thermal_of_zone_register);
static void devm_thermal_of_zone_release(struct device *dev, void *res) static void devm_thermal_of_zone_release(struct device *dev, void *res)
{ {
......
...@@ -259,25 +259,12 @@ struct thermal_zone_params { ...@@ -259,25 +259,12 @@ struct thermal_zone_params {
/* Function declarations */ /* Function declarations */
#ifdef CONFIG_THERMAL_OF #ifdef CONFIG_THERMAL_OF
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 *devm_thermal_of_zone_register(struct device *dev, int id, void *data, struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, int id, void *data,
const struct thermal_zone_device_ops *ops); const struct thermal_zone_device_ops *ops);
void thermal_of_zone_unregister(struct thermal_zone_device *tz);
void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz); void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz);
void thermal_of_zone_unregister(struct thermal_zone_device *tz);
#else #else
static inline
struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, int id, void *data,
const struct thermal_zone_device_ops *ops)
{
return ERR_PTR(-ENOTSUPP);
}
static inline static inline
struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, int id, void *data, struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, int id, void *data,
...@@ -286,10 +273,6 @@ struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, in ...@@ -286,10 +273,6 @@ struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, in
return ERR_PTR(-ENOTSUPP); return ERR_PTR(-ENOTSUPP);
} }
static inline void thermal_of_zone_unregister(struct thermal_zone_device *tz)
{
}
static inline void devm_thermal_of_zone_unregister(struct device *dev, static inline void devm_thermal_of_zone_unregister(struct device *dev,
struct thermal_zone_device *tz) struct thermal_zone_device *tz)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment