linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: bcm-qspi: fix build error
@ 2016-09-18 18:33 Sudip Mukherjee
  2016-09-19  9:20 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2016-09-18 18:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, linux-spi, Sudip Mukherjee

While building m68k allmodconfig, the build was failing with the error:

drivers/spi/spi-bcm-qspi.c:1300:13:
error: 'bcm_qspi_suspend' undeclared here (not in a function)
  .suspend = bcm_qspi_suspend,

drivers/spi/spi-bcm-qspi.c:1301:13:
error: 'bcm_qspi_resume' undeclared here (not in a function)
  .resume  = bcm_qspi_resume,

bcm_qspi_suspend() and bcm_qspi_resume() are only defined when
CONFIG_PM_SLEEP is defined. Use the macro SET_SYSTEM_SLEEP_PM_OPS to
use it only when CONFIG_PM_SLEEP is defined.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

m68k build log is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/160355865

 drivers/spi/spi-bcm-qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index 8fff43e..f06a3824 100644
--- a/drivers/spi/spi-bcm-qspi.c
+++ b/drivers/spi/spi-bcm-qspi.c
@@ -1297,8 +1297,8 @@ static int bcm_qspi_resume(struct device *dev)
 #endif /* CONFIG_PM_SLEEP */
 
 const struct dev_pm_ops bcm_qspi_pm_ops = {
-	.suspend = bcm_qspi_suspend,
-	.resume  = bcm_qspi_resume,
+	SET_SYSTEM_SLEEP_PM_OPS(bcm_qspi_suspend,
+				bcm_qspi_resume)
 };
 /* pm_ops to be called by SoC specific platform driver */
 EXPORT_SYMBOL_GPL(bcm_qspi_pm_ops);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: bcm-qspi: fix build error
  2016-09-18 18:33 [PATCH] spi: bcm-qspi: fix build error Sudip Mukherjee
@ 2016-09-19  9:20 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2016-09-19  9:20 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, linux-spi, arnd

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On Sun, Sep 18, 2016 at 07:33:34PM +0100, Sudip Mukherjee wrote:
> While building m68k allmodconfig, the build was failing with the error:
> 
> drivers/spi/spi-bcm-qspi.c:1300:13:
> error: 'bcm_qspi_suspend' undeclared here (not in a function)
>   .suspend = bcm_qspi_suspend,
> 
> drivers/spi/spi-bcm-qspi.c:1301:13:
> error: 'bcm_qspi_resume' undeclared here (not in a function)
>   .resume  = bcm_qspi_resume,

This doesn't apply against current code, please check and resend if it's
not because it's already fixed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-19  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-18 18:33 [PATCH] spi: bcm-qspi: fix build error Sudip Mukherjee
2016-09-19  9:20 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).