From: Jérémy Lefaure Date: Wed, 4 Jan 2017 00:13:49 +0000 (-0600) Subject: usb: musb: fix compilation warning on unused function X-Git-Tag: v4.9.84~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=157c02d2feaefd4eb8ae02ec37c7bd73d869f7d0;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index aac28d998073..2d9a8067eaca 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2043,6 +2043,7 @@ struct musb_pending_work { struct list_head node; }; +#ifdef CONFIG_PM /* * Called from musb_runtime_resume(), musb_resume(), and * musb_queue_resume_work(). Callers must take musb->lock. @@ -2070,6 +2071,7 @@ static int musb_run_resume_work(struct musb *musb) return error; } +#endif /* * Called to run work if device is active or else queue the work to happen