]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: musb: blackfin: fix unused warnings on suspend/resume
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Thu, 2 Feb 2017 03:30:24 +0000 (21:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 09:05:11 +0000 (10:05 +0100)
commit1ef2bcefa21d1c0c61bfce1f994a0fcd12ab40e7
tree7c769104cad835c06f9ffd01f499109f3cc08456
parent45abfa683bec97427078d5c122c2166fb989a03a
usb: musb: blackfin: fix unused warnings on suspend/resume

When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use
bfin_resume and bfin_suspend even if CONFIG_PM is enabled:

drivers/usb/musb/blackfin.c:602:12: warning: ‘bfin_resume’ defined but
not used [-Wunused-function]
 static int bfin_resume(struct device *dev)
            ^~~~~~~~~~~
drivers/usb/musb/blackfin.c:585:12: warning: ‘bfin_suspend’ defined but
not used [-Wunused-function]
 static int bfin_suspend(struct device *dev)
            ^~~~~~~~~~~~

The preprocessor condition should be on CONFIG_PM_SLEEP, not on CONFIG_PM.
However it is better to mark these functions as __maybe_unused.

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/blackfin.c