Commit 579f3a6d authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Linus Torvalds

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: 3daaf2c7 ("pcmcia: Make use of the helper macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS()")
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5dfbfe71
...@@ -1299,7 +1299,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -1299,7 +1299,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)
return ret; return ret;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int yenta_dev_suspend_noirq(struct device *dev) static int yenta_dev_suspend_noirq(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment