]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI/ASPM: Remove redundant check of pcie_set_clkpm
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 24 May 2016 09:32:10 +0000 (17:32 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 11 Jun 2016 00:07:03 +0000 (19:07 -0500)
Without supporting clock PM capable, if we want to disable clkpm, we don't
need this extra check as it must already be zero for the enable argument.
And it's the same for enabling clkpm here.  So let's remove this check.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/aspm.c

index 2dfe7fdb77e7fe95d6b22d1cc925fe24a06c685b..0ec649d961d7a6ee515747c3458a8ce1df108099 100644 (file)
@@ -139,7 +139,7 @@ static void pcie_set_clkpm_nocheck(struct pcie_link_state *link, int enable)
 static void pcie_set_clkpm(struct pcie_link_state *link, int enable)
 {
        /* Don't enable Clock PM if the link is not Clock PM capable */
-       if (!link->clkpm_capable && enable)
+       if (!link->clkpm_capable)
                enable = 0;
        /* Need nothing if the specified equals to current state */
        if (link->clkpm_enabled == enable)