The cw1200 uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/net/wireless/st/cw1200/cw1200_spi.c:450:12: error: 'cw1200_spi_suspend' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. For the DEV_PM_OPS definition, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
||
|---|---|---|
| .. | ||
| bh.c | ||
| bh.h | ||
| cw1200.h | ||
| cw1200_sdio.c | ||
| cw1200_spi.c | ||
| debug.c | ||
| debug.h | ||
| fwio.c | ||
| fwio.h | ||
| hwbus.h | ||
| hwio.c | ||
| hwio.h | ||
| Kconfig | ||
| main.c | ||
| Makefile | ||
| pm.c | ||
| pm.h | ||
| queue.c | ||
| queue.h | ||
| scan.c | ||
| scan.h | ||
| sta.c | ||
| sta.h | ||
| txrx.c | ||
| txrx.h | ||
| wsm.c | ||
| wsm.h | ||