From patchwork Mon Nov 9 03:21:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 321731 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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 7AFB1C4742C for ; Mon, 9 Nov 2020 03:21:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24F7C206F4 for ; Mon, 9 Nov 2020 03:21:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="sMcA3xod" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729025AbgKIDVZ (ORCPT ); Sun, 8 Nov 2020 22:21:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728191AbgKIDVZ (ORCPT ); Sun, 8 Nov 2020 22:21:25 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69AD6C0613CF; Sun, 8 Nov 2020 19:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=9ccmp8c2bM7yoQL9161bvYGYwR+a7M197QPEnd7pBS8=; b=sMcA3xodBofJCZFcVjN+CXOwGD 3UMUWvK7TnT5vvv3P12VZi29eJ40OTnWoEv+GnCBVO6WPQbWqsIQxfn2ebL7QSXYddlSb+mGiCmWZ nhUOWQVFRppWLbiL7YSNz6mtD+uxXeRI6uMCyx5myzYA8Mzo16Iaoz3yUsHY4nA1NUF1V1e6bJMhd Lp+Dh5YpCyflbGyThrOnDxJNN9OEH6AW6Xnq4aPpOCqFb10l5C9kzGD7m1FDi1t7jMxgf1eAxFIHs ZQb8r/JJsRsGUoMYS++aje65p13oYrLmu5/1lwv2lEXAcnXG8CE46CJ4u/gsSUrzI6SH2lQOimRn8 i6eIO7og==; Received: from [2601:1c0:6280:3f0::64ec] (helo=smtpauth.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbxk9-0003It-9p; Mon, 09 Nov 2020 03:21:22 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Taniya Das , linux-next@vger.kernel.org, Nathan Chancellor , Andrew Morton Subject: [PATCH -next v2] clk: pm_clock: provide stubs for pm_clk_runtime_suspend/_resume Date: Sun, 8 Nov 2020 19:21:15 -0800 Message-Id: <20201109032115.10610-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add stubs for pm_clk_runtime_suspend() and pm_clk_runtime_resume() to fix build errors when CONFIG_PM and CONFIG_PM_CLK are not enabled. Fixes these build errors: ../drivers/clk/qcom/camcc-sc7180.c: In function ‘cam_cc_sc7180_probe’: ../drivers/clk/qcom/camcc-sc7180.c:1672:8: error: implicit declaration of function ‘pm_clk_runtime_resume’; did you mean ‘pm_runtime_resume’? [-Werror=implicit-function-declaration] ret = pm_clk_runtime_resume(&pdev->dev); ^~~~~~~~~~~~~~~~~~~~~ ../drivers/clk/qcom/camcc-sc7180.c:1681:3: error: implicit declaration of function ‘pm_clk_runtime_suspend’; did you mean ‘pm_runtime_suspend’? [-Werror=implicit-function-declaration] pm_clk_runtime_suspend(&pdev->dev); ^~~~~~~~~~~~~~~~~~~~~~ Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180") Signed-off-by: Randy Dunlap Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Pavel Machek Cc: linux-pm@vger.kernel.org Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Cc: Taniya Das Cc: linux-next@vger.kernel.org Cc: Nathan Chancellor Cc: Andrew Morton Reviewed-by: Nathan Chancellor --- v2: move the function stubs to be inside the #else (for !CONFIG_PM) as suggested by Nathan to fix another build error include/linux/pm_clock.h | 8 ++++++++ 1 file changed, 8 insertions(+) --- linux-next-20201106.orig/include/linux/pm_clock.h +++ linux-next-20201106/include/linux/pm_clock.h @@ -27,6 +27,14 @@ extern int pm_clk_runtime_resume(struct .runtime_resume = pm_clk_runtime_resume, #else #define USE_PM_CLK_RUNTIME_OPS +static inline int pm_clk_runtime_suspend(struct device *dev) +{ + return 0; +} +static inline int pm_clk_runtime_resume(struct device *dev) +{ + return 0; +} #endif #ifdef CONFIG_PM_CLK