Commit 7018773a authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Greg Kroah-Hartman

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: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8a9e658a
...@@ -253,6 +253,9 @@ static int msm_otg_reset(struct otg_transceiver *otg) ...@@ -253,6 +253,9 @@ static int msm_otg_reset(struct otg_transceiver *otg)
} }
#define PHY_SUSPEND_TIMEOUT_USEC (500 * 1000) #define PHY_SUSPEND_TIMEOUT_USEC (500 * 1000)
#define PHY_RESUME_TIMEOUT_USEC (100 * 1000)
#ifdef CONFIG_PM_SLEEP
static int msm_otg_suspend(struct msm_otg *motg) static int msm_otg_suspend(struct msm_otg *motg)
{ {
struct otg_transceiver *otg = &motg->otg; struct otg_transceiver *otg = &motg->otg;
...@@ -334,7 +337,6 @@ static int msm_otg_suspend(struct msm_otg *motg) ...@@ -334,7 +337,6 @@ static int msm_otg_suspend(struct msm_otg *motg)
return 0; return 0;
} }
#define PHY_RESUME_TIMEOUT_USEC (100 * 1000)
static int msm_otg_resume(struct msm_otg *motg) static int msm_otg_resume(struct msm_otg *motg)
{ {
struct otg_transceiver *otg = &motg->otg; struct otg_transceiver *otg = &motg->otg;
...@@ -399,6 +401,7 @@ static int msm_otg_resume(struct msm_otg *motg) ...@@ -399,6 +401,7 @@ static int msm_otg_resume(struct msm_otg *motg)
return 0; return 0;
} }
#endif
static void msm_otg_start_host(struct otg_transceiver *otg, int on) static void msm_otg_start_host(struct otg_transceiver *otg, int on)
{ {
...@@ -972,7 +975,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev) ...@@ -972,7 +975,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev)
msm_otg_debugfs_cleanup(); msm_otg_debugfs_cleanup();
cancel_work_sync(&motg->sm_work); cancel_work_sync(&motg->sm_work);
msm_otg_resume(motg); pm_runtime_resume(&pdev->dev);
device_init_wakeup(&pdev->dev, 0); device_init_wakeup(&pdev->dev, 0);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
...@@ -1050,13 +1053,9 @@ static int msm_otg_runtime_resume(struct device *dev) ...@@ -1050,13 +1053,9 @@ static int msm_otg_runtime_resume(struct device *dev)
dev_dbg(dev, "OTG runtime resume\n"); dev_dbg(dev, "OTG runtime resume\n");
return msm_otg_resume(motg); return msm_otg_resume(motg);
} }
#else
#define msm_otg_runtime_idle NULL
#define msm_otg_runtime_suspend NULL
#define msm_otg_runtime_resume NULL
#endif #endif
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int msm_otg_pm_suspend(struct device *dev) static int msm_otg_pm_suspend(struct device *dev)
{ {
struct msm_otg *motg = dev_get_drvdata(dev); struct msm_otg *motg = dev_get_drvdata(dev);
...@@ -1086,25 +1085,24 @@ static int msm_otg_pm_resume(struct device *dev) ...@@ -1086,25 +1085,24 @@ static int msm_otg_pm_resume(struct device *dev)
return 0; return 0;
} }
#else
#define msm_otg_pm_suspend NULL
#define msm_otg_pm_resume NULL
#endif #endif
#ifdef CONFIG_PM
static const struct dev_pm_ops msm_otg_dev_pm_ops = { static const struct dev_pm_ops msm_otg_dev_pm_ops = {
.runtime_suspend = msm_otg_runtime_suspend, SET_SYSTEM_SLEEP_PM_OPS(msm_otg_pm_suspend, msm_otg_pm_resume)
.runtime_resume = msm_otg_runtime_resume, SET_RUNTIME_PM_OPS(msm_otg_runtime_suspend, msm_otg_runtime_resume,
.runtime_idle = msm_otg_runtime_idle, msm_otg_runtime_idle)
.suspend = msm_otg_pm_suspend,
.resume = msm_otg_pm_resume,
}; };
#endif
static struct platform_driver msm_otg_driver = { static struct platform_driver msm_otg_driver = {
.remove = __devexit_p(msm_otg_remove), .remove = __devexit_p(msm_otg_remove),
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &msm_otg_dev_pm_ops, .pm = &msm_otg_dev_pm_ops,
#endif
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment