Re: [PATCH v2 2/2] usb: host: xhci-plat: Fix build warning when !CONFIG_PM

2014-02-18 Thread Felipe Balbi
On Fri, Jan 31, 2014 at 02:29:53AM -0200, Fabio Estevam wrote:
 From: Fabio Estevam fabio.este...@freescale.com
 
 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 o...@lixom.net
 Reported-by: Olof Johansson o...@lixom.net
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Acked-by: Felipe Balbi ba...@ti.com

 ---
 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


signature.asc
Description: Digital signature


Re: [PATCH v2 2/2] usb: host: xhci-plat: Fix build warning when !CONFIG_PM

2014-02-03 Thread Olof Johansson
On Thu, Jan 30, 2014 at 8:29 PM, Fabio Estevam feste...@gmail.com wrote:
 From: Fabio Estevam fabio.este...@freescale.com

 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 o...@lixom.net
 Reported-by: Olof Johansson o...@lixom.net
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Acked-by: Olof Johansson o...@lixom.net
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html