thermal: cpu_cooling: Fix power calculation when CPUs are offline
authorKapileshwar Singh <kapileshwar.singh@arm.com>
Mon, 16 Mar 2015 12:00:51 +0000 (12:00 +0000)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 5 May 2015 04:27:54 +0000 (21:27 -0700)
commitdd658e02357ec879edd0c62ee1f3a19c92b0b027
tree7902429108c8910d4cff06a0887be36ccc190b29
parent54b92aae834ce8d02d6092f8ae5eb1fe0d607f1e
thermal: cpu_cooling: Fix power calculation when CPUs are offline

Ensure that the CPU for which the frequency is being requested
is online. If none of the CPUs are online the requested power is
returned as 0.

Acked-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/cpu_cooling.c