Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: fsl-lpspi: Fix build warning when !CONFIG_PM

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@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
a18656ea 6599be34

+2
+2
drivers/spi/spi-fsl-lpspi.c
··· 786 786 return IRQ_NONE; 787 787 } 788 788 789 + #ifdef CONFIG_PM 789 790 static int fsl_lpspi_runtime_resume(struct device *dev) 790 791 { 791 792 struct spi_controller *controller = dev_get_drvdata(dev); ··· 820 819 821 820 return 0; 822 821 } 822 + #endif 823 823 824 824 static int fsl_lpspi_init_rpm(struct fsl_lpspi_data *fsl_lpspi) 825 825 {