Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp557399imm; Fri, 28 Sep 2018 03:06:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV61kkQduhTiLdx99lqpUSw8Y8psZvra15UhLXQEmB3pWPe3AK16vZ2KImmHHNIdidOn4qNzY X-Received: by 2002:a63:5d55:: with SMTP id o21-v6mr14049434pgm.349.1538129204415; Fri, 28 Sep 2018 03:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538129204; cv=none; d=google.com; s=arc-20160816; b=jM/ChOIuwNLQmKWEktlB+XneATKCbob05V6lMegp33CVKpydfOZEcZlqfHOEQYJmdL jfa4uuKOfQ2AJyxmnEHeWlXK4IJValxXzd/OUUXFyH11no5qoJu7b7oJYLVZ9ht3+rn7 aJ71uNBXSFLSO43n/cBg403GiYEoM9amyqG55VjA0o5v7h62QEbB1l9xfDFWrt7zDa9t ZZc/IkDTe9EnCh1VYiinJsdoQQFw4xCsNJVM/7aOVauH84XEDZ06fVM07j+iti3/4G1t pLfIphcXTs4qQW99nMNaVaVVuwTMHFsi7PEMre45A9d0SqrCaGyBI3+okDeUpQZZ4YSO vUKg== 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=rY3EfxSJHU+Dj5YmNYGLJO7gM0K4DYAwgx7mFy1rb18=; b=Mp09d6MzrIU05bFIxvOMWTgFakZq1q6igugIjLkjwITGpjV1+nwbixF4ergK7U+n9y dDVAkaYsLPcQEarta1guGoUMh9znlzS8Kf3rb+3HeZuIHTJQm6YlUNT8yi45+Ort8SuT CxtvvBcMUn9SpKvg9DckaYx2quGOBdpaUHNVZeQfpjVc1D/qqDH5D1ynfyJwOOeO1Gii Hw9ztK7Kg4fb9CVIKPEhADNHLPp4Vc4EDf2/1nxUrjE1b3+eC/cyMpmGE2I6wWx804Q9 v6O53PylDwV7wTGK07Uu6ZKO3sKHfSPqtLl4BEku2JEOLRgQ35eCT8ZgQTJIQBzmO2Ca 195Q== 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 127-v6si4787954pgj.25.2018.09.28.03.06.27; Fri, 28 Sep 2018 03:06:44 -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 S1729349AbeI1Q1x (ORCPT + 99 others); Fri, 28 Sep 2018 12:27:53 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:1045 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729286AbeI1Q1x (ORCPT ); Fri, 28 Sep 2018 12:27:53 -0400 X-UUID: 70bc8abef791401cb320befe34534a28-20180928 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 117818808; Fri, 28 Sep 2018 18:04:46 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 28 Sep 2018 18:04:45 +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; Fri, 28 Sep 2018 18:04:44 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v5 3/9] PCI: mediatek: Remove the redundant dev->pm_domain check Date: Fri, 28 Sep 2018 18:04:34 +0800 Message-ID: <1538129080-8206-4-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> References: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 1C03DAE02A2BC320B4A04AF13BDB27E79C59D76E793E44A0AF2AEAD3C2C340CB2000: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 3ab80d6..e2c4127 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) @@ -1002,10 +1000,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); @@ -1017,10 +1013,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