Make mv_u3d_pm_ops static because mv_u3d_pm_ops is not exported.
Also, CONFIG_PM_SLEEP is used to remove unnecessary ifdefs.

Signed-off-by: Jingoo Han <[email protected]>
---
 drivers/usb/gadget/mv_u3d_core.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/mv_u3d_core.c b/drivers/usb/gadget/mv_u3d_core.c
index b5cea27..345a0f9 100644
--- a/drivers/usb/gadget/mv_u3d_core.c
+++ b/drivers/usb/gadget/mv_u3d_core.c
@@ -2021,7 +2021,7 @@ err_pdata:
        return retval;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int mv_u3d_suspend(struct device *dev)
 {
        struct mv_u3d *u3d = dev_get_drvdata(dev);
@@ -2064,10 +2064,10 @@ static int mv_u3d_resume(struct device *dev)
 
        return 0;
 }
-
-SIMPLE_DEV_PM_OPS(mv_u3d_pm_ops, mv_u3d_suspend, mv_u3d_resume);
 #endif
 
+static SIMPLE_DEV_PM_OPS(mv_u3d_pm_ops, mv_u3d_suspend, mv_u3d_resume);
+
 static void mv_u3d_shutdown(struct platform_device *dev)
 {
        struct mv_u3d *u3d = dev_get_drvdata(&dev->dev);
@@ -2085,9 +2085,7 @@ static struct platform_driver mv_u3d_driver = {
        .driver         = {
                .owner  = THIS_MODULE,
                .name   = "mv-u3d",
-#ifdef CONFIG_PM
                .pm     = &mv_u3d_pm_ops,
-#endif
        },
 };
 
-- 
1.7.2.5

Reply via email to