Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3524631imm; Sun, 14 Oct 2018 22:46:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV605F7bGvPt8tAOO8SYHkDPJwFd7VBt2XgjGwm8AHlAPLXxBYv2Wr2S5XFsqA5JXnDzcMOKB X-Received: by 2002:a62:fb04:: with SMTP id x4-v6mr16138777pfm.210.1539582392715; Sun, 14 Oct 2018 22:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539582392; cv=none; d=google.com; s=arc-20160816; b=vHpkjrNKRGobxMSXAxwZpbepjNtFI19JCa83LxMj16KxpwdEp4A2RQX4wbxu+SDJ9F 0Kh5maHQJg1LE0Kt0lZlCX7oQq81560RGWOga18+CkwI2lnmno+JGxtMc04XxyAC3394 O/l9SeknVkXtsYkk+cl/pc2oJLv2iDJmqTQfXN12cN2E+JsmDh0w+G1qhgEk1NFZbmsJ mfbx8DomlcXF9UzBTn0rlFtqJqrgaVbXu2U6La/CqWq+9tJes+HTBII6EeRqjaTUCtNd 29yhJNYWGnRXbCmntw4m54gsvB3Id7yBsNmnhK6AHdp7NHHPYoIrdAvMgWtjhGzVKvcJ u+FQ== 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=goOcfar+Kh8rvmy6HybgVe4AzNkT2Q0UnkRXSU2gxew=; b=gQL2jtMTcX72nXTcaL2Gx+uNwvWD5cV3xmoBRWpIHDnBT5b66WA2WbJ9cxzUebOKrd J+tLwv2QCuFD854AciYYr1cazVYmIubjoCyxQvxV/ME39cUVg3i1qe9qeNnCJG+E6ojz dwVSue46s55OCVyUhB27Lpb4xGhyMcMZkAy1PYymfgH3WS6Ho7rww+0ddYNN1gDNPHeC S3nZFKGppW0bJeH8zPKIzCDxjc9jA211/6nerIFO9aQdg9xJxKzo1y4Jc3JCBwOb7/qS zS2/LtK6D8VPB/UBFGABZ2E13k0mQPmVIkHWBANCuCjSJsqVIymxGq21lFKV3o2772GV NSUQ== 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 o13-v6si9948254pgm.513.2018.10.14.22.46.18; Sun, 14 Oct 2018 22:46:32 -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 S1726910AbeJON2u (ORCPT + 99 others); Mon, 15 Oct 2018 09:28:50 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:63418 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726663AbeJON2t (ORCPT ); Mon, 15 Oct 2018 09:28:49 -0400 X-UUID: 9c58ef8206e941b0b949adb4317dab09-20181015 X-UUID: 9c58ef8206e941b0b949adb4317dab09-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 1223071847; Mon, 15 Oct 2018 13:44:54 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 15 Oct 2018 13:44:52 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 15 Oct 2018 13:44:51 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v7 3/9] PCI: mediatek: Remove the redundant dev->pm_domain check Date: Mon, 15 Oct 2018 13:44:41 +0800 Message-ID: <1539582287-9171-4-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539582287-9171-1-git-send-email-honghui.zhang@mediatek.com> References: <1539582287-9171-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: FE23C49215FE18E4F16D0340076F0E992963C6CB812C3083ADF82C3D2BAD23552000: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 --- 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