]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: tegra: powergate: Don't error out if new state == old state
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 28 Mar 2013 20:35:04 +0000 (21:35 +0100)
committerStephen Warren <swarren@nvidia.com>
Fri, 29 Mar 2013 16:38:30 +0000 (10:38 -0600)
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>
arch/arm/mach-tegra/powergate.c

index c472bed3245e974da8ae1779a5c72ba35696b417..af9067e2867cfccfcce5aca150bcc804f8820f99 100644 (file)
@@ -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);