summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-03-28 21:35:04 +0100
committerStephen Warren <swarren@nvidia.com>2013-03-29 17:38:30 +0100
commiteebd1fda2342014a50ed3fd132e5dc6e8b5251e8 (patch)
tree04fb54e4078c8cc1b02aea5f5de47cecdcab5872 /arch/arm/mach-tegra
parentARM: tegra: Export tegra_powergate_sequence_power_up() (diff)
downloadlinux-eebd1fda2342014a50ed3fd132e5dc6e8b5251e8.tar.xz
linux-eebd1fda2342014a50ed3fd132e5dc6e8b5251e8.zip
ARM: tegra: powergate: Don't error out if new state == old state
Don't treat it as an error if a partition is already in the same power state when a user wants to power it on or off. This allows code to proceed if no state change is required. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/powergate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index c472bed3245e..af9067e2867c 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -76,7 +76,7 @@ static int tegra_powergate_set(int id, bool new_state)
if (status == new_state) {
spin_unlock_irqrestore(&tegra_powergate_lock, flags);
- return -EINVAL;
+ return 0;
}
pmc_write(PWRGATE_TOGGLE_START | id, PWRGATE_TOGGLE);