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: 370570 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp4607164jam; Mon, 25 Jan 2021 20:40:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+hI2JUgp+dbxA6LbRXT2uGzr/vG3AOFstXdiknaDFVTSd/zoz48n9RNaiXmQqm14JGGXL X-Received: by 2002:a05:6402:c9:: with SMTP id i9mr181037edu.123.1611636028197; Mon, 25 Jan 2021 20:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611636028; cv=none; d=google.com; s=arc-20160816; b=Tlrj5y90AME11mZkWjslxXmG3/lBTGDXt6VWQIZthw4fmRrNMpbVmU+wqsZYRQW845 +etuAmVlvYxk+mFoDKOyNEq3agVI3FbtufDBtY7Q2zGfXeD4m2MppEDtoCnCsctEnt2/ ggElheJiaSJyq6BfcPv/m+4gWKT1wH72bIOMfkc3H7sxzm0okk1qPN6lU2n3PD7J/hH+ za/qyQT8qFgXNw88LCq9tqb/REsq0NTimTgk8JRgTSaASBZD/KR/y/ItkCoxr0PZCrCe 1o+Hj8gG/MxcSjgroIzQy6iq+3CIoE7MxTeLg8Un9AKyLhW1bHUea8SsiKoQzi6OXM0r A9aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=i2U4qdtOv+iYxM8phmQ9O/ZG0N8MT3ayNPlpBo5HxzY=; b=b6swHrveRtNM/c8j+18NUM44LGaGv0H1GqdLaNvj3lAbYHqBw8+rb2oc55XuZxhVNw m/MVggngRoj8XbJvKq+2JNv39N+36ZlHPfV4oAjo/bXb5hPECPbpBMoEZY/7JRk5fXIz DY7NLSpelY2GVY9fXAEDBMbrpVAx5C6eQ9RWLIv+0D6gM0awNTp4GXJ1gDHn/zPPPAlI IzPyDJqLm7ldk9Lnq9I2ShExE9DfAI39RdsD0IVFRT2QdGXVXmU5qMLhNdbfEBfMEAyj gL8adsEh7sfUSU6XQV4XhmY7TrpGtJakgjGwAbovAqhXI4isCYs+XcFtJgTOsQ0pNe4Z wnBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDx1dBTs; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b40si8719986edf.251.2021.01.25.20.40.27; Mon, 25 Jan 2021 20:40:28 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDx1dBTs; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726149AbhAZEih (ORCPT + 13 others); Mon, 25 Jan 2021 23:38:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:40190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728416AbhAYMvj (ORCPT ); Mon, 25 Jan 2021 07:51:39 -0500 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 Cc: Arnd Bergmann , stable@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.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 --- 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(-) -- 2.29.2 Tested-by: Nicolas Schichan 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);