mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 12:10:23 -04:00
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>
This commit is contained in:
committed by
Stephen Warren
parent
99f69fea23
commit
eebd1fda23
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user