thermal: core: move passive attr to tz->device.groups
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:08:45 +0000 (21:08 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
commit3a836bfe9ff6342303bd2a146bcc42eebc3a259a
treed0c3ac708145247268a17d4d2a8ebc0de6c44b7e
parent8baa5dae60adf95c44d52be3dae2367e3d5e9530
thermal: core: move passive attr to tz->device.groups

This patch moves the passive attribute to tz->device.groups. Moving the
passive attribute also requires a .is_visible() callback implementation
for its attribute group.

The logic behind the visibility of passive attribute is kept the same.
We only expose the passive attribute if the thermal driver has exposed
at least one passive trip point.

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