Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1394004

[PATCH 16/31] thermal: core: move to_thermal_zone() macro to header file

From Eduardo Valentin <edubezval@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 16/31] thermal: core: move to_thermal_zone() macro to header file
Date 2016-05-04 08:10 +0200
Message-ID <ruYaw-6P7-63@gated-at.bofh.it> (permalink)
References <ruYau-6P7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Simply making this macro available to other thermal core
files.

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
---
 drivers/thermal/thermal_core.c | 3 ---
 drivers/thermal/thermal_core.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 93da7d9..8506d17 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -742,9 +742,6 @@ int thermal_build_list_of_policies(char *buf)
 
 /* sys I/F for thermal zone */
 
-#define to_thermal_zone(_dev) \
-	container_of(_dev, struct thermal_zone_device, device)
-
 static ssize_t
 type_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index b80847c..38d977f 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -54,6 +54,9 @@ struct thermal_instance {
 	unsigned int weight; /* The weight of the cooling device */
 };
 
+#define to_thermal_zone(_dev) \
+	container_of(_dev, struct thermal_zone_device, device)
+
 int thermal_register_governor(struct thermal_governor *);
 void thermal_unregister_governor(struct thermal_governor *);
 void thermal_zone_device_passive_update(struct thermal_zone_device *, int);
-- 
2.1.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/31] thermal: reorganizing thermal core Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:10 +0200
  [PATCH 12/31] thermal: core: remove unnecessary device_remove() calls Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:10 +0200
  [PATCH 16/31] thermal: core: move to_thermal_zone() macro to header file Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:10 +0200
  [PATCH 22/31] thermal: core: move idr handling to device management section Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:10 +0200
  [PATCH 17/31] thermal: core: move thermal_zone sysfs to thermal_sysfs.c Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:10 +0200
  [PATCH 01/31] thermal: core: prevent zones with no types to be registered Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:20 +0200
  [PATCH 03/31] thermal: core: group device_create_file() calls that are always created Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:20 +0200
  [PATCH 04/31] thermal: core: use dev.groups to manage always present tz attributes Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:20 +0200
  [PATCH 02/31] thermal: core: group thermal_zone DEVICE_ATTR's declarations Eduardo Valentin <edubezval@gmail.com> - 2016-05-04 08:20 +0200

csiph-web