[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1539582287-9171-4-git-send-email-honghui.zhang@mediatek.com>
Date: Mon, 15 Oct 2018 13:44:41 +0800
From: <honghui.zhang@...iatek.com>
To: <lorenzo.pieralisi@....com>, <bhelgaas@...gle.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <ryder.lee@...iatek.com>
CC: <ulf.hansson@...aro.org>, <marc.zyngier@....com>,
<matthias.bgg@...il.com>, <devicetree@...r.kernel.org>,
<yingjoe.chen@...iatek.com>, <eddie.huang@...iatek.com>,
<honghui.zhang@...iatek.com>, <youlin.pei@...iatek.com>,
<yt.shen@...iatek.com>, <jianjun.wang@...iatek.com>
Subject: [PATCH v7 3/9] PCI: mediatek: Remove the redundant dev->pm_domain check
From: Honghui Zhang <honghui.zhang@...iatek.com>
It's no needed to check whether device have pm_domain attached before
calling the pm_runtime_XXX interface, remove it.
Signed-off-by: Honghui Zhang <honghui.zhang@...iatek.com>
---
drivers/pci/controller/pcie-mediatek.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index bcdac9b..59fdb60 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -225,10 +225,8 @@ static void mtk_pcie_subsys_powerdown(struct mtk_pcie *pcie)
clk_disable_unprepare(pcie->free_ck);
- if (dev->pm_domain) {
- pm_runtime_put_sync(dev);
- pm_runtime_disable(dev);
- }
+ pm_runtime_put_sync(dev);
+ pm_runtime_disable(dev);
}
static void mtk_pcie_port_free(struct mtk_pcie_port *port)
@@ -998,10 +996,8 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
pcie->free_ck = NULL;
}
- if (dev->pm_domain) {
- pm_runtime_enable(dev);
- pm_runtime_get_sync(dev);
- }
+ pm_runtime_enable(dev);
+ pm_runtime_get_sync(dev);
/* enable top level clock */
err = clk_prepare_enable(pcie->free_ck);
@@ -1013,10 +1009,8 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
return 0;
err_free_ck:
- if (dev->pm_domain) {
- pm_runtime_put_sync(dev);
- pm_runtime_disable(dev);
- }
+ pm_runtime_put_sync(dev);
+ pm_runtime_disable(dev);
return err;
}
--
2.6.4
Powered by blists - more mailing lists