OSDN Git Service

usb: musb: fix compilation warning on unused function
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Wed, 4 Jan 2017 00:13:49 +0000 (18:13 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:05:51 +0000 (11:05 +0100)
commit157c02d2feaefd4eb8ae02ec37c7bd73d869f7d0
tree771eaeac44af16f47cbceee1b2665447485e7bfc
parentc0d61d463d0de1c6ebc69bdb9bd9da01773c831f
usb: musb: fix compilation warning on unused function

commit c8bd2ac3b4c6c84c4a7cdceaed626247db698ab2 upstream.

The function musb_run_resume_work is called only when CONFIG_PM is
enabled. So this function should not be defined when CONFIG_PM is
disabled. Otherwise the compiler issues a warning:

drivers/usb/musb/musb_core.c:2057:12: error: ‘musb_run_resume_work’ defined but
not used [-Werror=unused-function]
 static int musb_run_resume_work(struct musb *musb)
            ^~~~~~~~~~~~~~~~~~~~

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_core.c