mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 06:08:07 +00:00
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>
This commit is contained in:
parent
8c300fe282
commit
c8bd2ac3b4
1 changed files with 2 additions and 0 deletions
|
@ -2050,6 +2050,7 @@ struct musb_pending_work {
|
||||||
struct list_head node;
|
struct list_head node;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
/*
|
/*
|
||||||
* Called from musb_runtime_resume(), musb_resume(), and
|
* Called from musb_runtime_resume(), musb_resume(), and
|
||||||
* musb_queue_resume_work(). Callers must take musb->lock.
|
* musb_queue_resume_work(). Callers must take musb->lock.
|
||||||
|
@ -2077,6 +2078,7 @@ static int musb_run_resume_work(struct musb *musb)
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called to run work if device is active or else queue the work to happen
|
* Called to run work if device is active or else queue the work to happen
|
||||||
|
|
Loading…
Reference in a new issue