The patch spi: fsl-lpspi: Fix build warning when !CONFIG_PM has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From a18656ea39855519495c9b996205b5fe9cf86123 Mon Sep 17 00:00:00 2001 From: Axel Lin <axel.lin@xxxxxxxxxx> Date: Sun, 7 Apr 2019 22:58:16 +0800 Subject: [PATCH] spi: fsl-lpspi: Fix build warning when !CONFIG_PM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add #ifdef CONFIG_PM guard to fix build warning when !CONFIG_PM drivers/spi/spi-fsl-lpspi.c:810:12: warning: â??fsl_lpspi_runtime_suspendâ?? defined but not used [-Wunused-function] static int fsl_lpspi_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-fsl-lpspi.c:789:12: warning: â??fsl_lpspi_runtime_resumeâ?? defined but not used [-Wunused-function] static int fsl_lpspi_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi") Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> --- drivers/spi/spi-fsl-lpspi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index a5c6f27666f3..9b281260fc02 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -786,6 +786,7 @@ static irqreturn_t fsl_lpspi_isr(int irq, void *dev_id) return IRQ_NONE; } +#ifdef CONFIG_PM static int fsl_lpspi_runtime_resume(struct device *dev) { struct spi_controller *controller = dev_get_drvdata(dev); @@ -819,6 +820,7 @@ static int fsl_lpspi_runtime_suspend(struct device *dev) return 0; } +#endif static int fsl_lpspi_init_rpm(struct fsl_lpspi_data *fsl_lpspi) { -- 2.20.1