mmc: brcmstb: Fix sdhci_pltfm_suspend link error
Subsystems (5)
PATCH 1/1 mmc: brcmstb: Fix sdhci_pltfm_suspend link error
From: Arnd Bergmann <[email protected]>
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
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
sdhci-brcmstb.c
mmc/host/sdhci-brcmstb.o:(sdhci_brcmstb_shutdown) in archivedrivers/built-in.a
Making the call conditional on the symbol fixes the link error.
---
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(-)
drivers/mmc/host/sdhci-brcmstb.c +2 -1
@@ -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);
Signature · 7 lines
2.29.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
+Nicolas,
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
sdhci_pltfm_suspend()is only available whenCONFIG_PM_SLEEPsupport is built into the kernel, which caused a regression in a recent bugfix:ld.lld: error: undefined symbol:
sdhci_pltfm_suspendQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
sdhci-brcmstb.c
mmc/host/sdhci-brcmstb.o:(sdhci_brcmstb_shutdown) in archivedrivers/built-in.aMaking the call conditional on the symbol fixes the link error.
Quoted 7 lines
Fixes 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")Fixes e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback")Signed-off-by Arnd Bergmann <[email protected]>---
It would be helpful if someone could test this to ensure that the driver works correctly even whenCONFIG_PM_SLEEPis disabled
Why not create stubs for sdhci_pltfm_suspend() when CONFIG_PM_SLEEP=n? I don't think this is going to be a functional issue given that the purpose of having the .shutdown() function is to save power if we cannot that is fine, too.
Signature · 6 lines
Florian _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 25 lines · Florian Fainelli
+Nicolas,
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
sdhci_pltfm_suspend()is only available whenCONFIG_PM_SLEEPsupport is built into the kernel, which caused a regression in a recent bugfix:ld.lld: error: undefined symbol:
sdhci_pltfm_suspendQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
sdhci-brcmstb.c
mmc/host/sdhci-brcmstb.o:(sdhci_brcmstb_shutdown) in archivedrivers/built-in.aMaking the call conditional on the symbol fixes the link error.
Quoted 7 lines
Fixes 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")Fixes e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback")Signed-off-by Arnd Bergmann <[email protected]>---
It would be helpful if someone could test this to ensure that the driver works correctly even whenCONFIG_PM_SLEEPis disabled
Quoted 6 lines
Why not create stubs for
sdhci_pltfm_suspend()whenCONFIG_PM_SLEEP=n? I don't think this is going to be a functional issue given that the purpose of having the .shutdown() function is to save power if we cannot that is fine, too.
--
Florian
I would prefer this approach - we shouldn't leave stub functions unimplemented, which is what looks to me.
I just posted a new patch for this, please have a look and test it.
Kind regards
Uffe
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Alan Cooper
maintainerQuoted 4 lines
I just posted a new patch for this, please have a look and test it.
Kind regards
Uffe
I tested your new patch and it works.
Thanks
Al
Quoted 34 lines · Ulf Hansson
Quoted 25 lines · Florian Fainelli
+Nicolas,
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
sdhci_pltfm_suspend()is only available whenCONFIG_PM_SLEEPsupport is built into the kernel, which caused a regression in a recent bugfix:ld.lld: error: undefined symbol:
sdhci_pltfm_suspendQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
sdhci-brcmstb.c
mmc/host/sdhci-brcmstb.o:(sdhci_brcmstb_shutdown) in archivedrivers/built-in.aMaking the call conditional on the symbol fixes the link error.
Quoted 7 lines
Fixes 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")Fixes e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback")Signed-off-by Arnd Bergmann <[email protected]>---
It would be helpful if someone could test this to ensure that the driver works correctly even whenCONFIG_PM_SLEEPis disabledQuoted 6 lines
Why not create stubs for
sdhci_pltfm_suspend()whenCONFIG_PM_SLEEP=n? I don't think this is going to be a functional issue given that the purpose of having the .shutdown() function is to save power if we cannot that is fine, too.
--
Florian
Quoted 7 lines
I would prefer this approach - we shouldn't leave stub functions unimplemented, which is what looks to me.
I just posted a new patch for this, please have a look and test it.
Kind regards
Uffe
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
sdhci_pltfm_suspend()is only available whenCONFIG_PM_SLEEPsupport is built into the kernel, which caused a regression in a recent bugfix:ld.lld: error: undefined symbol:
sdhci_pltfm_suspendQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
sdhci-brcmstb.c
mmc/host/sdhci-brcmstb.o:(sdhci_brcmstb_shutdown) in archivedrivers/built-in.aMaking the call conditional on the symbol fixes the link error.
Quoted 7 lines
Fixes 5b191dcba719 ("mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend")Fixes e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback")Signed-off-by Arnd Bergmann <[email protected]>---
It would be helpful if someone could test this to ensure that the driver works correctly even whenCONFIG_PM_SLEEPis disabled
Good evening Arnd,
I have just given this patch a test, and the driver works fine on my side, afterwards.
Quoted 19 lines
--- drivers/mmc/host/sdhci-brcmstb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/host/sdhci-brcmstb.c +2
-1@@ -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);
Signature · 7 lines
Nicolas Schichan Freebox SAS _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel