spi/pxa2xx: fix compilation warning when !CONFIG_PM_SLEEP
Subsystems (3)
PATCH 1/1 spi/pxa2xx: fix compilation warning when !CONFIG_PM_SLEEP
CONFIG_PM will be set if either or both CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME is set. Compiling the driver with !CONFIG_PM_SLEEP causes following compilation warning:
drivers/spi/spi-pxa2xx.c:1270:12: warning: ‘pxa2xx_spi_suspend’ defined but not used [-Wunused-function]
Fix this by using CONFIG_PM_SLEEP instead.
--- drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-pxa2xx.c +1 -1
@@ -1268,7 +1268,7 @@ static void pxa2xx_spi_shutdown(struct platform_device *pdev)dev_err (&pdev->dev,"shutdown failed with %d\n" , status); } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int pxa2xx_spi_suspend (struct device *dev) {struct driver_data *drv_data =dev_get_drvdata (dev);
Signature · 6 lines
1.8.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Mika Westerberg
CONFIG_PMwill be set if either or bothCONFIG_PM_SLEEPandCONFIG_PM_RUNTIMEis set. Compiling the driver with !CONFIG_PM_SLEEP causes following compilation warning:
Applied, thanks.