thermal: core: move mode attribute to tz->device.groups
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:08:44 +0000 (21:08 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
commit8baa5dae60adf95c44d52be3dae2367e3d5e9530
tree152fbcb49052d336ebcbbe292cba9fb30e397843
parent66e554bde9f879ea09379848acc4446effad9dfb
thermal: core: move mode attribute to tz->device.groups

Moving mode attribute to tz->device.groups requires the implementation
of a .is_visible() callback. The condition returned by .is_visible() of
the mode attribute group is kept the same, we allow the attribute to be
visible only if ops->get_mode() is set by the thermal driver.

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