diff options
author | Durgadoss R <durgadoss.r@intel.com> | 2012-09-18 07:34:53 +0200 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2012-11-05 06:56:32 +0100 |
commit | 71350db43b4c5c4da59b729c805f00ff6675b99d (patch) | |
tree | b1fdba40aa6849f4392160ea3e0ff581f30fa6c7 /drivers/thermal/thermal_sys.c | |
parent | Thermal: Refactor thermal.h file (diff) | |
download | linux-71350db43b4c5c4da59b729c805f00ff6675b99d.tar.xz linux-71350db43b4c5c4da59b729c805f00ff6675b99d.zip |
Thermal: Move thermal_instance to thermal_core.h
This patch creates a thermal_core.h file which can contain
all defines used by the core thermal framework files. For
now, move the thermal_instance structure to thermal_core.h
This structure is used by files under drivers/thermal/.
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/thermal_sys.c')
-rw-r--r-- | drivers/thermal/thermal_sys.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 9ee42ca4d289..bbc834625f7f 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -37,31 +37,12 @@ #include <net/netlink.h> #include <net/genetlink.h> +#include "thermal_core.h" + MODULE_AUTHOR("Zhang Rui"); MODULE_DESCRIPTION("Generic thermal management sysfs support"); MODULE_LICENSE("GPL"); -#define THERMAL_NO_TARGET -1UL -/* - * This structure is used to describe the behavior of - * a certain cooling device on a certain trip point - * in a certain thermal zone - */ -struct thermal_instance { - int id; - char name[THERMAL_NAME_LENGTH]; - struct thermal_zone_device *tz; - struct thermal_cooling_device *cdev; - int trip; - unsigned long upper; /* Highest cooling state for this trip point */ - unsigned long lower; /* Lowest cooling state for this trip point */ - unsigned long target; /* expected cooling state */ - char attr_name[THERMAL_NAME_LENGTH]; - struct device_attribute attr; - struct list_head tz_node; /* node in tz->thermal_instances */ - struct list_head cdev_node; /* node in cdev->thermal_instances */ -}; - static DEFINE_IDR(thermal_tz_idr); static DEFINE_IDR(thermal_cdev_idr); static DEFINE_MUTEX(thermal_idr_lock); |