Hi, On Mon, Mar 25, 2013 at 07:48:25AM +0000, Jingoo Han wrote: > Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following > build warning when CONFIG_PM_SLEEP is not selected. This is because > sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used > when the CONFIG_PM_SLEEP is enabled. > > drivers/usb/dwc3/core.c:682:12: warning: 'dwc3_suspend' defined but not used [-Wunused-function] > drivers/usb/dwc3/core.c:709:12: warning: 'dwc3_resume' defined but not used [-Wunused-function] > drivers/usb/dwc3/dwc3-omap.c:430:12: warning: 'dwc3_omap_suspend' defined but not used [-Wunused-function] > drivers/usb/dwc3/dwc3-omap.c:440:12: warning: 'dwc3_omap_resume' defined but not used [-Wunused-function] > drivers/usb/dwc3/dwc3-exynos.c:185:12: warning: 'dwc3_exynos_suspend' defined but not used [-Wunused-function] > drivers/usb/dwc3/dwc3-exynos.c:194:12: warning: 'dwc3_exynos_resume' defined but not used [-Wunused-function] > > Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> > --- > drivers/usb/dwc3/core.c | 2 ++ > drivers/usb/dwc3/dwc3-exynos.c | 2 ++ > drivers/usb/dwc3/dwc3-omap.c | 2 ++ > 3 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index e2325ad..10729ff 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -679,6 +679,7 @@ static void dwc3_complete(struct device *dev) > spin_unlock_irqrestore(&dwc->lock, flags); > } > > +#ifdef CONFIG_PM_SLEEP > static int dwc3_suspend(struct device *dev) > { > struct dwc3 *dwc = dev_get_drvdata(dev); > @@ -738,6 +739,7 @@ static int dwc3_resume(struct device *dev) > > return 0; > } > +#endif good point, but looks a bit incomplete. Looking at the definition of SET_SYSTEM_SLEEP_PM_OPS, it seems like you could remove #ifdef CONFIG_PM from that file. Can you cook a patch along those lines ? -- balbi
Attachment:
signature.asc
Description: Digital signature