]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thermal: core: move to_cooling_device macro to header file
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:09:01 +0000 (21:09 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
Make the to_cooling_device() macro available across
files in thermal core.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h

index b14913ea554480a742ccfb081e740358e137e73d..d55a41a317b5fb80798bfe7cbce6484d06e97094 100644 (file)
@@ -799,9 +799,6 @@ int thermal_build_list_of_policies(char *buf)
 }
 
 /* sys I/F for cooling device */
-#define to_cooling_device(_dev)        \
-       container_of(_dev, struct thermal_cooling_device, device)
-
 static ssize_t
 thermal_cooling_device_type_show(struct device *dev,
                                 struct device_attribute *attr, char *buf)
index bd8869333739bb3f50381a3067f62cc98e63c9a3..56192434ea81efa545c76bade9f8ab95f92bcd4c 100644 (file)
@@ -57,6 +57,9 @@ struct thermal_instance {
 #define to_thermal_zone(_dev) \
        container_of(_dev, struct thermal_zone_device, device)
 
+#define to_cooling_device(_dev)        \
+       container_of(_dev, struct thermal_cooling_device, device)
+
 int thermal_register_governor(struct thermal_governor *);
 void thermal_unregister_governor(struct thermal_governor *);
 void thermal_zone_device_rebind_exception(struct thermal_zone_device *,