]> git.karo-electronics.de Git - linux-beck.git/commit
thermal: core: use dev.groups to manage always present tz attributes
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:08:42 +0000 (21:08 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
commit1c600861fa6fd8891c3c6936e93288f912630f53
tree16f21756f110778832a01e38d44eaf9cafc73c01
parent308f726ac872bee72ab0fccb0ef6a75364e47496
thermal: core: use dev.groups to manage always present tz attributes

Thermal zones attributes are all being created using
device_create_file(). This has the disadvantage of making the code
complicated and sometimes we may miss the cleanup of them.

This patch starts to move the thermal zone sysfs attributes to the
dev.groups, so Linux device core manage them for us. For now, this patch
only moves those attributes are always present regardless of thermal
zone condition.

This change has also the advantage of cleaning up the thermal zone
parameters sysfs entries that are left unclean after device
registration.

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