]> git.baikalelectronics.ru Git - kernel.git/commit
spi: atmel: remove warning when !CONFIG_PM_SLEEP
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 10 Sep 2015 08:19:52 +0000 (10:19 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 10 Sep 2015 10:09:52 +0000 (11:09 +0100)
commita12fb198f8f73b3a1b18c14152521504685ac303
tree5de0466604aa2047aa018054d15ebaaf456cd62c
parent7080a36663ec94f7ed976e9e162c15cc4a03bc56
spi: atmel: remove warning when !CONFIG_PM_SLEEP

When CONFIG_PM is defined but not CONFIG_PM_SLEEP (this happens when
CONFIG_SUSPEND is not defined), there is the following warning:

drivers/spi/spi-atmel.c:1723:12: warning: ‘atmel_spi_suspend’ defined but not used [-Wunused-function]
drivers/spi/spi-atmel.c:1741:12: warning: ‘atmel_spi_resume’ defined but not used [-Wunused-function]

Enclose both atmel_spi_suspend and atmel_spi_resume in #ifdef
CONFIG_PM_SLEEP/#endif to solve that.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-atmel.c