From patchwork Sat Feb 27 11:56:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Jun X-Patchwork-Id: 12107653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23F97C433E0 for ; Sat, 27 Feb 2021 11:59:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 525A864ED5 for ; Sat, 27 Feb 2021 11:59:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 525A864ED5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=+giReRXJRld1EbAqSAK847N4hIVpelDWfcNWGa0Tz2Q=; b=H8ebNxF1lLVJuI45xV2b33mpJd BmaAG+S6CA4DYPEnx/LJOGzF+HIInJjjgv3jp3ra4+5xxbOhifk4Y+WBOmUHc7iSfpkNLwIgcvNaZ 2wHbuPMs7zpoUecU11CTC6zKnO/Cpm8eYg9QCH53ynjC/oVX6fSZ6gtx6fyG7ap1yabxWNcXfnLAe wDxz+Gy81/6vjGH4naBUaiA+5CRm4kyfCOoz0pzPlUOF9UlPqZ1ZUTPUCkKIK3b9pw3wYgT71FXao FbQEtJ0xPY44HcvNXmQ/ObHoTG7eXVLsMqNm4/l9T0qokyWui+RVQsFXO3qh3749JS/Wb6+vyEJFU 0au4YH5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFyFM-00013B-L9; Sat, 27 Feb 2021 11:58:56 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFyFH-00011l-Vp; Sat, 27 Feb 2021 11:58:53 +0000 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DnlP65k9bzjSTy; Sat, 27 Feb 2021 19:56:42 +0800 (CST) Received: from mdc.huawei.com (10.175.112.208) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Feb 2021 19:58:09 +0800 From: Chen Jun To: , , Subject: [PATCH] rockchip: Make cdn_dp_resume depend on CONFIG_PM_SLEEP Date: Sat, 27 Feb 2021 11:56:28 +0000 Message-ID: <20210227115628.104177-1-chenjun102@huawei.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Originating-IP: [10.175.112.208] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210227_065852_326273_C5066891 X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heiko@sntech.de, airlied@linux.ie, hjc@rock-chips.com, dri-devel@lists.freedesktop.org, rui.xiang@huawei.com, daniel@ffwll.ch Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org If build Image without CONFIG_PM_SLEEP, there would be a compile warning: warning: ‘cdn_dp_resume’ defined but not used [-Wunused-function] Because SET_SYSTEM_SLEEP_PM_OPS will do nothing without CONFIG_PM_SLEEP. Make cdn_dp_resume depend on CONFIG_PM_SLEEP Signed-off-by: Chen Jun --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index a4a45daf93f2..063a60d213ba 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -1121,6 +1121,7 @@ static int cdn_dp_suspend(struct device *dev) return ret; } +#ifdef CONFIG_PM_SLEEP static int cdn_dp_resume(struct device *dev) { struct cdn_dp_device *dp = dev_get_drvdata(dev); @@ -1133,6 +1134,7 @@ static int cdn_dp_resume(struct device *dev) return 0; } +#endif static int cdn_dp_probe(struct platform_device *pdev) {