On Fri, Jan 31, 2014 at 02:29:53AM -0200, Fabio Estevam wrote: > From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> > > Building keystone_defconfig leads to the following build warnings: > > drivers/usb/host/xhci-plat.c:203:12: warning: 'xhci_plat_suspend' defined but not used [-Wunused-function] > drivers/usb/host/xhci-plat.c:211:12: warning: 'xhci_plat_resume' defined but not used [-Wunused-function] > > Cc: Olof Johansson <olof@xxxxxxxxx> > Reported-by: Olof Johansson <olof@xxxxxxxxx> > Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> Acked-by: Felipe Balbi <balbi@xxxxxx> > --- > Build-tested only > > Changes since v1: > - none > > drivers/usb/host/xhci-plat.c | 13 ++++--------- > 1 file changed, 4 insertions(+), 9 deletions(-) > > diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c > index 9c2e583..104e48f 100644 > --- a/drivers/usb/host/xhci-plat.c > +++ b/drivers/usb/host/xhci-plat.c > @@ -199,7 +199,7 @@ static int xhci_plat_remove(struct platform_device *dev) > return 0; > } > > -#ifdef CONFIG_PM > +#ifdef CONFIG_PM_SLEEP > static int xhci_plat_suspend(struct device *dev) > { > struct usb_hcd *hcd = dev_get_drvdata(dev); > @@ -215,14 +215,9 @@ static int xhci_plat_resume(struct device *dev) > > return xhci_resume(xhci, 0); > } > +#endif /* CONFIG_PM_SLEEP */ > > -static const struct dev_pm_ops xhci_plat_pm_ops = { > - SET_SYSTEM_SLEEP_PM_OPS(xhci_plat_suspend, xhci_plat_resume) > -}; > -#define DEV_PM_OPS (&xhci_plat_pm_ops) > -#else > -#define DEV_PM_OPS NULL > -#endif /* CONFIG_PM */ > +static SIMPLE_DEV_PM_OPS(xhci_plat_pm_ops, xhci_plat_suspend, xhci_plat_resume); > > #ifdef CONFIG_OF > static const struct of_device_id usb_xhci_of_match[] = { > @@ -237,7 +232,7 @@ static struct platform_driver usb_xhci_driver = { > .remove = xhci_plat_remove, > .driver = { > .name = "xhci-hcd", > - .pm = DEV_PM_OPS, > + .pm = &xhci_plat_pm_ops, > .of_match_table = of_match_ptr(usb_xhci_of_match), > }, > }; > -- > 1.8.1.2 > -- balbi
Attachment:
signature.asc
Description: Digital signature