aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2011-02-14 23:12:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 13:55:15 -0500
commit7018773aca1b46e4f29a8be2c6652448eb603099 (patch)
treeb9e1e96ae8406da2cd770b7f23d4f014aff7291a /drivers/usb/otg
parent8a9e658ad3bea034d34e47acc7ea7e5e628fc893 (diff)
USB: OTG: msm: Fix compiler warning with CONFIG_PM disabled
This patch fixes the below compiler warning drivers/usb/otg/msm72k_otg.c:257: warning: 'msm_otg_suspend' defined but not used Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r--drivers/usb/otg/msm72k_otg.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/usb/otg/msm72k_otg.c b/drivers/usb/otg/msm72k_otg.c
index 1cd52edcd0c2..4d79017c16f3 100644
--- a/drivers/usb/otg/msm72k_otg.c
+++ b/drivers/usb/otg/msm72k_otg.c
@@ -253,6 +253,9 @@ static int msm_otg_reset(struct otg_transceiver *otg)
253} 253}
254 254
255#define PHY_SUSPEND_TIMEOUT_USEC (500 * 1000) 255#define PHY_SUSPEND_TIMEOUT_USEC (500 * 1000)
256#define PHY_RESUME_TIMEOUT_USEC (100 * 1000)
257
258#ifdef CONFIG_PM_SLEEP
256static int msm_otg_suspend(struct msm_otg *motg) 259static int msm_otg_suspend(struct msm_otg *motg)
257{ 260{
258 struct otg_transceiver *otg = &motg->otg; 261 struct otg_transceiver *otg = &motg->otg;
@@ -334,7 +337,6 @@ static int msm_otg_suspend(struct msm_otg *motg)
334 return 0; 337 return 0;
335} 338}
336 339
337#define PHY_RESUME_TIMEOUT_USEC (100 * 1000)
338static int msm_otg_resume(struct msm_otg *motg) 340static int msm_otg_resume(struct msm_otg *motg)
339{ 341{
340 struct otg_transceiver *otg = &motg->otg; 342 struct otg_transceiver *otg = &motg->otg;
@@ -399,6 +401,7 @@ skip_phy_resume:
399 401
400 return 0; 402 return 0;
401} 403}
404#endif
402 405
403static void msm_otg_start_host(struct otg_transceiver *otg, int on) 406static void msm_otg_start_host(struct otg_transceiver *otg, int on)
404{ 407{
@@ -972,7 +975,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev)
972 msm_otg_debugfs_cleanup(); 975 msm_otg_debugfs_cleanup();
973 cancel_work_sync(&motg->sm_work); 976 cancel_work_sync(&motg->sm_work);
974 977
975 msm_otg_resume(motg); 978 pm_runtime_resume(&pdev->dev);
976 979
977 device_init_wakeup(&pdev->dev, 0); 980 device_init_wakeup(&pdev->dev, 0);
978 pm_runtime_disable(&pdev->dev); 981 pm_runtime_disable(&pdev->dev);
@@ -1050,13 +1053,9 @@ static int msm_otg_runtime_resume(struct device *dev)
1050 dev_dbg(dev, "OTG runtime resume\n"); 1053 dev_dbg(dev, "OTG runtime resume\n");
1051 return msm_otg_resume(motg); 1054 return msm_otg_resume(motg);
1052} 1055}
1053#else
1054#define msm_otg_runtime_idle NULL
1055#define msm_otg_runtime_suspend NULL
1056#define msm_otg_runtime_resume NULL
1057#endif 1056#endif
1058 1057
1059#ifdef CONFIG_PM 1058#ifdef CONFIG_PM_SLEEP
1060static int msm_otg_pm_suspend(struct device *dev) 1059static int msm_otg_pm_suspend(struct device *dev)
1061{ 1060{
1062 struct msm_otg *motg = dev_get_drvdata(dev); 1061 struct msm_otg *motg = dev_get_drvdata(dev);
@@ -1086,25 +1085,24 @@ static int msm_otg_pm_resume(struct device *dev)
1086 1085
1087 return 0; 1086 return 0;
1088} 1087}
1089#else
1090#define msm_otg_pm_suspend NULL
1091#define msm_otg_pm_resume NULL
1092#endif 1088#endif
1093 1089
1090#ifdef CONFIG_PM
1094static const struct dev_pm_ops msm_otg_dev_pm_ops = { 1091static const struct dev_pm_ops msm_otg_dev_pm_ops = {
1095 .runtime_suspend = msm_otg_runtime_suspend, 1092 SET_SYSTEM_SLEEP_PM_OPS(msm_otg_pm_suspend, msm_otg_pm_resume)
1096 .runtime_resume = msm_otg_runtime_resume, 1093 SET_RUNTIME_PM_OPS(msm_otg_runtime_suspend, msm_otg_runtime_resume,
1097 .runtime_idle = msm_otg_runtime_idle, 1094 msm_otg_runtime_idle)
1098 .suspend = msm_otg_pm_suspend,
1099 .resume = msm_otg_pm_resume,
1100}; 1095};
1096#endif
1101 1097
1102static struct platform_driver msm_otg_driver = { 1098static struct platform_driver msm_otg_driver = {
1103 .remove = __devexit_p(msm_otg_remove), 1099 .remove = __devexit_p(msm_otg_remove),
1104 .driver = { 1100 .driver = {
1105 .name = DRIVER_NAME, 1101 .name = DRIVER_NAME,
1106 .owner = THIS_MODULE, 1102 .owner = THIS_MODULE,
1103#ifdef CONFIG_PM
1107 .pm = &msm_otg_dev_pm_ops, 1104 .pm = &msm_otg_dev_pm_ops,
1105#endif
1108 }, 1106 },
1109}; 1107};
1110 1108