diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-03-28 21:35:04 +0100 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-03-29 10:38:30 -0600 |
commit | eebd1fda2342014a50ed3fd132e5dc6e8b5251e8 (patch) | |
tree | 04fb54e4078c8cc1b02aea5f5de47cecdcab5872 /arch/arm/mach-tegra/powergate.c | |
parent | 99f69fea23d3c87c4f3067cb69499ff76499d93b (diff) | |
download | linux-eebd1fda2342014a50ed3fd132e5dc6e8b5251e8.tar.bz2 |
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/powergate.c')
-rw-r--r-- | arch/arm/mach-tegra/powergate.c | 2 |
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); |