From patchwork Mon Jan 25 12:50:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12043375 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=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 3FFA6C433DB for ; Mon, 25 Jan 2021 12:54:30 +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 D501C222F9 for ; Mon, 25 Jan 2021 12:54:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D501C222F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=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=tYhqjcH/R07GPlRTqUWw1yLaXiowH+Q09G1pigk8mZ0=; b=svMLZ2bVurWsfm/3Cl026Sl5Nk yXnsuAs3TPbvGrfO2OAnBpxqJzU7HyJ5i2wALoj/8TWfC0In6g3aV836kGrJaqylolqLecxcVlMaq PuG1EEC3Qln8DEJhztsUjJYNkcv4zpZz402ReNHRxrJ2lOxfLa8EilVzGCAxPrG1EB7nUi3HEfB9R SkfeKd00tpUjYp3ovwslPPqYYV6UneYc8MixvVY+ED7tJzFCK4U+Tzple6+pSNI8/TQyNuVKSb48S 4H2skEnFAlJbtmuv2jriNObr0vtucMMzPzgBJUS9hLTfuCDqmmGEScKybcA+0XFIVycllRDNkPjLM CiNXDmAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l41Kc-00025X-HT; Mon, 25 Jan 2021 12:50:58 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l41Ka-00024z-2i for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2021 12:50:56 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id E3233222F9; Mon, 25 Jan 2021 12:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611579055; bh=UjDoBeFYelZMuB+VxEwk6WDvkWvuefpCNK4nN0+uaes=; h=From:To:Cc:Subject:Date:From; b=rDx1dBTsyoT3lVwZK41eQqKkTMWxKEM81hehefB75gPvh57ZdZ8X7SIxcgnPAH3n5 pPO/P7ND167R/ckDrI/UQ0ATv9qa4D8ice2NjybMMaU98IESGp/8BKom/v1Ak+6ffW /I3FcvqJ1TW1ZmCmKTf+OdC3UXd2X4lARf7O9/Sz77cbDZcbKheL1xr+dQWV9bknCF mfNuloCtfS4nkbK7t6x1c3anTzWdf+PHxzJdM76SII8Tf7zBK0Z9mNU3HX/DEYU/XM Oroxs+yWaHieK8Su8qfEG8uqSDqyNueBkyj2I6hyW0sUGtlqea3sId9yhfZAAqqFED 7QenohHVP3owg== From: Arnd Bergmann To: Al Cooper , Adrian Hunter , Ulf Hansson , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com Subject: [PATCH] mmc: brcmstb: Fix sdhci_pltfm_suspend link error Date: Mon, 25 Jan 2021 13:50:45 +0100 Message-Id: <20210125125050.102605-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_075056_195550_01012BB1 X-CRM114-Status: GOOD ( 15.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-mmc@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann sdhci_pltfm_suspend() is only available when CONFIG_PM_SLEEP support is built into the kernel, which caused a regression in a recent bugfix: ld.lld: error: undefined symbol: sdhci_pltfm_suspend >>> referenced by sdhci-brcmstb.c >>> mmc/host/sdhci-brcmstb.o:(sdhci_brcmstb_shutdown) in archive drivers/built-in.a Making the call conditional on the symbol fixes the link error. Fixes: 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend") Fixes: e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Tested-by: Nicolas Schichan --- It would be helpful if someone could test this to ensure that the driver works correctly even when CONFIG_PM_SLEEP is disabled --- drivers/mmc/host/sdhci-brcmstb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index f9780c65ebe9..dc9280b149db 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -314,7 +314,8 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) static void sdhci_brcmstb_shutdown(struct platform_device *pdev) { - sdhci_pltfm_suspend(&pdev->dev); + if (IS_ENABLED(CONFIG_PM_SLEEP)) + sdhci_pltfm_suspend(&pdev->dev); } MODULE_DEVICE_TABLE(of, sdhci_brcm_of_match);