summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-01-11 13:54:31 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-11 14:45:19 -0800
commit579f3a6d32a9c3d1cf5c2b1bd66817a2db31a968 (patch)
treec78033272260a8a0409d24253bd48bbcba454759
parent5dfbfe71e32406f08480185d396d94cf7fc7a7d6 (diff)
downloadlinux-stable-579f3a6d32a9c3d1cf5c2b1bd66817a2db31a968.tar.gz
linux-stable-579f3a6d32a9c3d1cf5c2b1bd66817a2db31a968.tar.bz2
linux-stable-579f3a6d32a9c3d1cf5c2b1bd66817a2db31a968.zip
drivers/pcmcia: Fix ifdef covering yenta_pm_ops
Currently, yenta_dev_suspend_noirq(), yenta_dev_resume_noirq(), and yenta_pm_ops are covered by "#ifdef CONFIG_PM", which results in compiler warnings in kernels built with CONFIG_PM_SLEEP=n and CONFIG_PM=y: drivers/pcmcia/yenta_socket.c:1322:12: warning: ‘yenta_dev_resume_noirq’ defined but not used [-Wunused-function] 1322 | static int yenta_dev_resume_noirq(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/pcmcia/yenta_socket.c:1303:12: warning: ‘yenta_dev_suspend_noirq’ defined but not used [-Wunused-function] 1303 | static int yenta_dev_suspend_noirq(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~ This affects kernels built without suspend and hibernation. Avoid these warnings by using "#ifdef CONFIG_PM_SLEEP". Fixes: 3daaf2c7aae8 ("pcmcia: Make use of the helper macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS()") Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/pcmcia/yenta_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 837877daed62..3966a6ceb1ac 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -1299,7 +1299,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)
return ret;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int yenta_dev_suspend_noirq(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);