Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5006463imm; Tue, 16 Oct 2018 03:48:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ie4oFUnLJcWAi8hAIfKHuOY00u0/iKzTJIcKQtETtdrkvSkRjZfryAWOxz2OfuYOO4J+r X-Received: by 2002:a17:902:d694:: with SMTP id v20-v6mr20833981ply.261.1539686908873; Tue, 16 Oct 2018 03:48:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539686908; cv=none; d=google.com; s=arc-20160816; b=J7eG6qOoJXFoRJsnp8zHCU5lI1BRFnODrMMSah8xgDxrjUkJ8bwgsORb5YGgXb66wS 3jABUlGmD4A5Sttir4AT1gTy20HEyFD1GE2OmKALeT0ruYsmifIvvemu0QtjpjawTm8Q XEXS0HCalF7iZBq7kAmo7DtLbGtvhSKq4Xs+lK3wi1YH1WUM/aZ3R2gWmXf01X4senxN nQTuGbX5mXwieL7jUT53tiOSEqgwsNt8J/odvPo4uez/n68OZTtHUZXynRwtfd7bEHBa c+Gsm4RiQPN/3jkYdqkMJexwRguKaPM3TDwQGCZ+L8KiiebNk+X3AcOD451hHUEcsv3C ygXg== 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=cGZtPkTqZnjMI0h8zCZMVwF/IZJAfyErLlCsdlGaYGA=; b=I62s62Cqtx7I9pFNHqTaYdrRjtSsXFG7yhmxR4B4FIf+2lWvSJ6uSP3TTLLb7Jj3nw yloC2k/k1bayshRctJOwQhU1DFitUMS5oZSFAfzRQfCqUTaroS9QnvT+wgdh6PlsewpR 9xJScJtEPoDcjCPsda4bB+M0pdlftzxgJM4+Cf8Ce1nhG3udJ5g2jMVbPuJKuwVpo2vJ Od0ZJu53HORZ/hcTb7qcN1Dupz1Q9r0eV3qsTyiJP0c0pKMBkqa/HyPpJP4OM3WLViJQ iPhmz7rLInw8/CdEvw1fhSA63rl4uwVVFgBAD3C1SmyRfBt9YOEoDy3sICfrLy8j1J4J iX2w== 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 o38-v6si13583073pgl.107.2018.10.16.03.48.13; Tue, 16 Oct 2018 03:48:28 -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 S1727078AbeJPSev (ORCPT + 99 others); Tue, 16 Oct 2018 14:34:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:47939 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726711AbeJPSeu (ORCPT ); Tue, 16 Oct 2018 14:34:50 -0400 X-UUID: 9972e47779f74a1f891f351d8d5e67c0-20181016 X-UUID: 9972e47779f74a1f891f351d8d5e67c0-20181016 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 176357168; Tue, 16 Oct 2018 18:44:57 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 16 Oct 2018 18:44:55 +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; Tue, 16 Oct 2018 18:44:54 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v9 3/9] PCI: mediatek: Remove the redundant dev->pm_domain check Date: Tue, 16 Oct 2018 18:44:44 +0800 Message-ID: <1539686690-24068-4-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539686690-24068-1-git-send-email-honghui.zhang@mediatek.com> References: <1539686690-24068-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 049BB0D034F28D2EB207ED42B7158FC94D19B1ACAE6161BAFF5085BB518D7D192000:8 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 288b8e2..6080b29 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