aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/tegra
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-02-11 18:03:25 +0000
committerThierry Reding <treding@nvidia.com>2016-04-05 15:22:50 +0200
commitc3ea297260b77a99a2383c1029a381d125f788fe (patch)
tree1ba83e7adc05685999649a2c886e787d88151b53 /drivers/soc/tegra
parentsoc/tegra: pmc: Fix verification of valid partitions (diff)
downloadlinux-dev-c3ea297260b77a99a2383c1029a381d125f788fe.tar.xz
linux-dev-c3ea297260b77a99a2383c1029a381d125f788fe.zip
soc/tegra: pmc: Remove additional check for a valid partition
The function tegra_powergate_is_powered() verifies that the partition being queried is valid and so there is no need to check this before calling tegra_powergate_is_powered() in powergate_show(). So remove this extra check. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc/tegra')
-rw-r--r--drivers/soc/tegra/pmc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index e75782b47267..8e358dbffaed 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -434,16 +434,18 @@ static struct notifier_block tegra_pmc_restart_handler = {
static int powergate_show(struct seq_file *s, void *data)
{
unsigned int i;
+ int status;
seq_printf(s, " powergate powered\n");
seq_printf(s, "------------------\n");
for (i = 0; i < pmc->soc->num_powergates; i++) {
- if (!pmc->soc->powergates[i])
+ status = tegra_powergate_is_powered(i);
+ if (status < 0)
continue;
seq_printf(s, " %9s %7s\n", pmc->soc->powergates[i],
- tegra_powergate_is_powered(i) ? "yes" : "no");
+ status ? "yes" : "no");
}
return 0;