]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/pcmcia: Fix ifdef covering yenta_pm_ops
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 11 Jan 2022 21:54:31 +0000 (13:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Jan 2022 22:45:19 +0000 (14:45 -0800)
commit498562be9546500f5aa372336c7fc20ee57c1212
treec78033272260a8a0409d24253bd48bbcba454759
parent691dfe8af099651eadac93e9350bfeac1a7d4d7c
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: d2710114ea1d ("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>
drivers/pcmcia/yenta_socket.c