Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3105706imm; Sun, 7 Oct 2018 20:26:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV62hEvB73VGd53XPOJ33aVNbSXndGrXF0/hp5OZFu+/NswPG6zViySTe82L+NweEB2oKso2z X-Received: by 2002:a63:3507:: with SMTP id c7-v6mr19245755pga.158.1538969207134; Sun, 07 Oct 2018 20:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538969207; cv=none; d=google.com; s=arc-20160816; b=jvzwAv4Dcv6URqvd+oQQhQG5/L56BkkivzRR9diH5cJ7wum0QXQPwOndeioXGoD3DK OlwifW7nb/UFDT4vDUrnw+tldWpFU0BqUPmVNAWHebne0IUW0sCEQTMXe7AmARM+r2gx VYU9jw4pmrxXu8Gn4Gt0r11yLFx4kts+s8epBowr9Y/pTU4mJb/rbZMDZ+bIrJXX4fSq PccM2H+Dqk48S+giXYwO1fYvmzwh8QitDH1HxMSPlh4wI7hXsi7g3WhwayWWzGndmdQ6 Ru6p5eY30Lh4i1mY6exSSYgyi1Pb6nUT6tv1ZWn0RBhNGGxENN6UwPrVt3oJ2cDxveXd c9oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=b+OSlpKBK4VKm2r5q4Dg2qq+QV0+eKVDMqD0ztHW3B4=; b=KBFpwAQv0yqapy3dkE4UFJ+CsrK10CfvSi4kEQU0Dftx0GJZ7nzzI9n9o04HK1iL1P qRm11Pa+Ia2Cj7dyLZKYZ+TX4bssr7nA3K/sCRz6w7K3z4zufD0+J805IMjmVbaq6Go1 8iza/NBFLJeydW0O/N9VvTy/MhveO4OecW8FNq1Ue98DFbalCtrKdeo/FAXJeVuSfeyI 9TX4yEKJ91YhSuWArZl5N1IMK3yetWjRWner9sW1IbU6zZA0zpOQE1klFgy0v6ASNaNC MHrCmYtIN6Mu26xxsvjthJcmFlwhWsi+v06k/N4fAtT9dONGgjlKSIB1v8oal5vy+ejL JTDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6-v6si16944224plq.233.2018.10.07.20.26.32; Sun, 07 Oct 2018 20:26:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726789AbeJHKeo (ORCPT + 99 others); Mon, 8 Oct 2018 06:34:44 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:57382 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726096AbeJHKen (ORCPT ); Mon, 8 Oct 2018 06:34:43 -0400 X-UUID: c4740b83e1be4ac2a0c60b3e9c8324ad-20181008 X-UUID: c4740b83e1be4ac2a0c60b3e9c8324ad-20181008 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 749628543; Mon, 08 Oct 2018 11:25:03 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 8 Oct 2018 11:25:01 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 8 Oct 2018 11:25:01 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v6 3/9] PCI: mediatek: Remove the redundant dev->pm_domain check Date: Mon, 8 Oct 2018 11:24:42 +0800 Message-ID: <1538969088-7136-4-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1538969088-7136-1-git-send-email-honghui.zhang@mediatek.com> References: <1538969088-7136-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Honghui Zhang 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 Acked-by: Ryder Lee --- 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