Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3630052imm; Mon, 15 Oct 2018 01:10:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV60VUYr3PI+3rpN4TnY2l9jxHZfoW/olzP3z3fpkKdS/3kjMEYnJVBIOREId8bOmp2SNl2CL X-Received: by 2002:a17:902:b58c:: with SMTP id a12-v6mr15714910pls.226.1539591002390; Mon, 15 Oct 2018 01:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539591002; cv=none; d=google.com; s=arc-20160816; b=KOPk405d2UC7opjJE5yiBU6iQWbDrfwHFr2p3famf2Sp3zOuXE6i39uHpBXrBGDtX8 nZfrFLhmM7F2GbpeHZ6TeAzICcGutikuaKJxn6jmtDWQOfLi2vd+nW7szAeL56yKSrY1 HTwtjsGJU7fYOVYAQrEFK/NYYhpGFbPISvuHF50Evz8lKassFNw7ysyAOCTCh86saOtX 6HTBqAb4gdqzG5fdjjWXHc+GCSULukNtdWnsaexk7Ng01RDmsJvDe+Xb5TPVstIuiacz R5LMDq3WljPncS0LHDkTOLJ1AdWDLKPIEWOK5Q37F2CcR2frZ0rbtvRuPzM5OV0VuzE/ 5XOA== 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=uBOXl/iF6RueUxgF+YS09zt1ruwDYu7MAgaUVjrXmEX2QpXPqsnKNNwsRZ6ZS3v3tW Tny0bWPieA1BnjZitn9kmQfqNDmxpd8cADhXoczoLcq6OqxVOApxLvUFBAFH/SUeNgoV j4IihPINue6m1ngSEFCttXUH7HSI+9AykKqO3A3sMukBjRI+T/JTKC+y7AW9tw2pU31r Nkh035Jiizso+7pgnT5oyjobnobmjqL5zsJqn1Dy8TyWOFqvcdR/faMNrKLHUTbe+/AQ Kr5gc4W5IaMaY958/09UQx0nKlcHNuAwNgv0l6JoZOaNGfp6fbjr8bpPt+RQ2UmL31LJ pUlw== 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 w71-v6si9509788pgd.163.2018.10.15.01.09.48; Mon, 15 Oct 2018 01:10:02 -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 S1726862AbeJOPx2 (ORCPT + 99 others); Mon, 15 Oct 2018 11:53:28 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:45415 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726764AbeJOPx1 (ORCPT ); Mon, 15 Oct 2018 11:53:27 -0400 X-UUID: 28ff8da79bd946a8a3607a8ea56d34ab-20181015 X-UUID: 28ff8da79bd946a8a3607a8ea56d34ab-20181015 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1699697583; Mon, 15 Oct 2018 16:09:07 +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; Mon, 15 Oct 2018 16:09:05 +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, 15 Oct 2018 16:09:04 +0800 From: To: , , , , , , CC: , , , , , , , , , , Subject: [PATCH v8 3/9] PCI: mediatek: Remove the redundant dev->pm_domain check Date: Mon, 15 Oct 2018 16:08:54 +0800 Message-ID: <1539590940-13355-4-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539590940-13355-1-git-send-email-honghui.zhang@mediatek.com> References: <1539590940-13355-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: DBCE5DF77538DDFDA31C63D954DC7094271CD4D00E6EA4AC1475F5F7BD3AA4552000: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 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