summaryrefslogtreecommitdiff
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorEduardo Valentin <edubezval@gmail.com>2016-11-08 08:08:52 +0300
committerZhang Rui <rui.zhang@intel.com>2016-11-23 05:06:12 +0300
commit4d0fe7490d7f4d61b582acbae718328284f151b9 (patch)
tree5ca30bdc6b8a80036775227886cf935845803b02 /include/linux/thermal.h
parente161aefb9a5fff038054231ffb80abbc2aa42238 (diff)
downloadlinux-4d0fe7490d7f4d61b582acbae718328284f151b9.tar.xz
thermal: core: move trips attributes to tz->device.groups
Finally, move the last thermal zone sysfs attributes to tz->device.groups: trips attributes. This requires adding a attribute_group to thermal_zone_device, creating it dynamically, and then setting all trips attributes in it. The trips attribute is then added to the tz->device.groups. As the removal of all attributes are handled by device core, the device remove calls are not needed anymore. 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>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 511182a88e76..e275e98bdceb 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -28,6 +28,7 @@
#include <linux/of.h>
#include <linux/idr.h>
#include <linux/device.h>
+#include <linux/sysfs.h>
#include <linux/workqueue.h>
#include <uapi/linux/thermal.h>
@@ -204,6 +205,7 @@ struct thermal_zone_device {
int id;
char type[THERMAL_NAME_LENGTH];
struct device device;
+ struct attribute_group trips_attribute_group;
struct thermal_attr *trip_temp_attrs;
struct thermal_attr *trip_type_attrs;
struct thermal_attr *trip_hyst_attrs;