diff options
author | Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> | 2017-01-03 19:13:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-05 13:18:05 -0500 |
commit | c8bd2ac3b4c6c84c4a7cdceaed626247db698ab2 (patch) | |
tree | 817c8ab3829cdd798b195904c661a02a3ab7b7d0 | |
parent | 8c300fe282fa254ea730c92cb0983e2642dc1fff (diff) |
usb: musb: fix compilation warning on unused function
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>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 9e226468a13e..fca288bbc800 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2050,6 +2050,7 @@ struct musb_pending_work { | |||
2050 | struct list_head node; | 2050 | struct list_head node; |
2051 | }; | 2051 | }; |
2052 | 2052 | ||
2053 | #ifdef CONFIG_PM | ||
2053 | /* | 2054 | /* |
2054 | * Called from musb_runtime_resume(), musb_resume(), and | 2055 | * Called from musb_runtime_resume(), musb_resume(), and |
2055 | * musb_queue_resume_work(). Callers must take musb->lock. | 2056 | * musb_queue_resume_work(). Callers must take musb->lock. |
@@ -2077,6 +2078,7 @@ static int musb_run_resume_work(struct musb *musb) | |||
2077 | 2078 | ||
2078 | return error; | 2079 | return error; |
2079 | } | 2080 | } |
2081 | #endif | ||
2080 | 2082 | ||
2081 | /* | 2083 | /* |
2082 | * Called to run work if device is active or else queue the work to happen | 2084 | * Called to run work if device is active or else queue the work to happen |