[05/11] thermal: Move set_trips function to the internal header

Message ID 20191012065255.23249-5-daniel.lezcano@linaro.org
State New
Headers show
Series
  • [01/11] thermal: Move default governor config option to the internal header
Related show

Commit Message

Daniel Lezcano Oct. 12, 2019, 6:52 a.m.
The function is not used in other place than the thermal directory. It
does not make sense to export its definition in the global header as
there is no use of it.

Move its the definition in the internal header and allow better
self-encapsulation.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

---
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Amit Kucheria Oct. 14, 2019, 2:32 p.m. | #1
On Sat, Oct 12, 2019 at 12:23 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>

> The function is not used in other place than the thermal directory. It


Grammar nit: is not used any place other than the thermal directory

> does not make sense to export its definition in the global header as

> there is no use of it.

>

> Move its the definition in the internal header and allow better

> self-encapsulation.


Grammar nit: Move the definition to the internal header

If you respin please fix the same for other patches in the series.




>

> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---

>  drivers/thermal/thermal_core.h | 2 ++

>  include/linux/thermal.h        | 3 ---

>  2 files changed, 2 insertions(+), 3 deletions(-)

>

> diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h

> index 6f6e0dcba4f2..301f5603def1 100644

> --- a/drivers/thermal/thermal_core.h

> +++ b/drivers/thermal/thermal_core.h

> @@ -72,6 +72,8 @@ struct thermal_trip {

>         enum thermal_trip_type type;

>  };

>

> +void thermal_zone_set_trips(struct thermal_zone_device *tz);

> +

>  /*

>   * This structure is used to describe the behavior of

>   * a certain cooling device on a certain trip point

> diff --git a/include/linux/thermal.h b/include/linux/thermal.h

> index 88e1faa3d72c..761d77571533 100644

> --- a/include/linux/thermal.h

> +++ b/include/linux/thermal.h

> @@ -398,7 +398,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,

>                                        struct thermal_cooling_device *);

>  void thermal_zone_device_update(struct thermal_zone_device *,

>                                 enum thermal_notify_event);

> -void thermal_zone_set_trips(struct thermal_zone_device *);

>

>  struct thermal_cooling_device *thermal_cooling_device_register(const char *,

>                 void *, const struct thermal_cooling_device_ops *);

> @@ -444,8 +443,6 @@ static inline int thermal_zone_unbind_cooling_device(

>  static inline void thermal_zone_device_update(struct thermal_zone_device *tz,

>                                               enum thermal_notify_event event)

>  { }

> -static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)

> -{ }

>  static inline struct thermal_cooling_device *

>  thermal_cooling_device_register(char *type, void *devdata,

>         const struct thermal_cooling_device_ops *ops)

> --

> 2.17.1

>

Patch

diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 6f6e0dcba4f2..301f5603def1 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -72,6 +72,8 @@  struct thermal_trip {
 	enum thermal_trip_type type;
 };
 
+void thermal_zone_set_trips(struct thermal_zone_device *tz);
+
 /*
  * This structure is used to describe the behavior of
  * a certain cooling device on a certain trip point
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 88e1faa3d72c..761d77571533 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -398,7 +398,6 @@  int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
 				       struct thermal_cooling_device *);
 void thermal_zone_device_update(struct thermal_zone_device *,
 				enum thermal_notify_event);
-void thermal_zone_set_trips(struct thermal_zone_device *);
 
 struct thermal_cooling_device *thermal_cooling_device_register(const char *,
 		void *, const struct thermal_cooling_device_ops *);
@@ -444,8 +443,6 @@  static inline int thermal_zone_unbind_cooling_device(
 static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
 					      enum thermal_notify_event event)
 { }
-static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)
-{ }
 static inline struct thermal_cooling_device *
 thermal_cooling_device_register(char *type, void *devdata,
 	const struct thermal_cooling_device_ops *ops)