From 663a5ea88bc04fe7e282b8de7b0830ad995b47cb Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Tue, 24 May 2016 17:32:10 +0800 Subject: [PATCH] UPSTREAM: PCI/ASPM: Remove redundant check of pcie_set_clkpm Without supporting clock PM capable, if we want to disable clkpm, we don't need this extra check as it already be zero for the enable argument. And it's the same for enabling clkpm here. So let's remove this check. Change-Id: I0dc251e5dea940a2288fbb31a58336dea83f2515 Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Signed-off-by: Shawn Lin (cherry picked from git.kernel.org/cgit/linux/kernel/git/next/linux-next.git commit a6c1c6f3547b6c4cbd4a30d67a968ee1519a8ffd) --- drivers/pci/pcie/aspm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 317e3558a35e..cbb1765ab00f 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -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) -- 2.34.1