From patchwork Tue Dec 8 19:55:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11959661 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 463D3C1B0D9 for ; Tue, 8 Dec 2020 20:36:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16D1523AC8 for ; Tue, 8 Dec 2020 20:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731474AbgLHUgW (ORCPT ); Tue, 8 Dec 2020 15:36:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbgLHUgW (ORCPT ); Tue, 8 Dec 2020 15:36:22 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2293CC061794; Tue, 8 Dec 2020 12:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=/DyOBoLOqAhQxAxeB3gv8SslfqThYQTnekcdauSyF8E=; b=eclshOGA8AQxjO7k4z6TbvPjul 2v4/mP20Q3YHTbbo4ykJtyOfhlcvVIpvFzCizjov1HdftKQ9TMI/jDMo2x83Frx5Cbwq10cwAunYK Wjpp8mtGKZfJq1p4GaAcXbtYv6odtis66bb8yAO/4mkMFfNtd1lvHw+doYzA/yJDSJ5HaURsqgDGf teEY3b2DlnWoHR5LpEWKl8+9Qzq+M9SNBHadiNKJcqm9txzplu+Aa5Yt6WoadI1xZ5gB0sXwlUjVh Y5t82sbyRrssYU70ohY1qg5RhoiHHZevWvmd4tj31W5Zpoi1dURauWWGhrTb5Fo+nh0XQ/I/hQo5y ARdowvmQ==; Received: from [2601:1c0:6280:3f0::1494] (helo=smtpauth.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmj5J-0000Vp-47; Tue, 08 Dec 2020 19:55:41 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Peter Chen , Pawel Laszczak , Roger Quadros , linux-usb@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH -next] usb: cdns3: fix build when PM_SLEEP is not set Date: Tue, 8 Dec 2020 11:55:35 -0800 Message-Id: <20201208195535.30024-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix build error when CONFIG_PM_SLEEP is not enabled by adding stubs for the PM_SLEEP functions. ../drivers/usb/cdns3/cdns3-plat.c: In function ‘cdns3_controller_resume’: ../drivers/usb/cdns3/cdns3-plat.c:246:2: error: implicit declaration of function ‘cdns_resume’; did you mean ‘cdns_remove’? [-Werror=implicit-function-declaration] cdns_resume(cdns, !PMSG_IS_AUTO(msg)); ^~~~~~~~~~~ Signed-off-by: Randy Dunlap Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman --- drivers/usb/cdns3/core.h | 5 +++++ 1 file changed, 5 insertions(+) --- linux-next-20201208.orig/drivers/usb/cdns3/core.h +++ linux-next-20201208/drivers/usb/cdns3/core.h @@ -127,5 +127,10 @@ int cdns_remove(struct cdns *cdns); #ifdef CONFIG_PM_SLEEP int cdns_resume(struct cdns *cdns, u8 set_active); int cdns_suspend(struct cdns *cdns); +#else /* CONFIG_PM_SLEEP */ +static inline int cdns_resume(struct cdns *cdns, u8 set_active) +{ return 0; } +static inline int cdns_suspend(struct cdns *cdns) +{ return 0; } #endif /* CONFIG_PM_SLEEP */ #endif /* __LINUX_CDNS3_CORE_H */