thermal: Move struct thermal_attr to the private header
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 2 Apr 2020 14:27:40 +0000 (16:27 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 14 Apr 2020 09:41:12 +0000 (11:41 +0200)
The structure belongs to the thermal core internals but it is exported
in the include/linux/thermal.h

For better self-encapsulation and less impact for the compilation if a
change is made on it. Move the structure in the thermal core internal
header file.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20200402142747.8307-2-daniel.lezcano@linaro.org
drivers/thermal/thermal_core.h
include/linux/thermal.h

index 8283055..5d08ad6 100644 (file)
@@ -41,6 +41,11 @@ extern struct thermal_governor *__governor_thermal_table_end[];
             __governor < __governor_thermal_table_end; \
             __governor++)
 
+struct thermal_attr {
+       struct device_attribute attr;
+       char name[THERMAL_NAME_LENGTH];
+};
+
 /*
  * This structure is used to describe the behavior of
  * a certain cooling device on a certain trip point
index 71cff87..5aa80fb 100644 (file)
@@ -35,6 +35,7 @@
 struct thermal_zone_device;
 struct thermal_cooling_device;
 struct thermal_instance;
+struct thermal_attr;
 
 enum thermal_device_mode {
        THERMAL_DEVICE_DISABLED = 0,
@@ -119,11 +120,6 @@ struct thermal_cooling_device {
        struct list_head node;
 };
 
-struct thermal_attr {
-       struct device_attribute attr;
-       char name[THERMAL_NAME_LENGTH];
-};
-
 /**
  * struct thermal_zone_device - structure for a thermal zone
  * @id:                unique id number for each thermal zone