]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Check for set_suspend and set_resume functions
authorTony Lindgren <tony@atomide.com>
Mon, 31 Mar 2008 11:23:20 +0000 (14:23 +0300)
committerTony Lindgren <tony@atomide.com>
Mon, 31 Mar 2008 11:23:54 +0000 (14:23 +0300)
Check for set_suspend and set_resume functions

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/omap2430.c

index 364d746d635436231063080a4bf6c11d626fed32..8041ddecec419f79807b2278e80be15444f78a51 100644 (file)
@@ -254,13 +254,16 @@ int musb_platform_suspend(struct musb *musb)
        OTG_FORCESTDBY_REG |= ENABLEFORCE; /* enable MSTANDBY */
        OTG_SYSCONFIG_REG |= AUTOIDLE;          /* enable auto idle */
 
-       musb->xceiv.set_suspend(&musb->xceiv, 1);
+       if (musb->xceiv.set_suspend)
+               musb->xceiv.set_suspend(&musb->xceiv, 1);
+
        return 0;
 }
 
 int musb_platform_resume(struct musb *musb)
 {
-       musb->xceiv.set_suspend(&musb->xceiv, 0);
+       if (musb->xceiv.set_suspend)
+               musb->xceiv.set_suspend(&musb->xceiv, 0);
 
        OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */
        OTG_SYSCONFIG_REG |= SMARTSTDBY;        /* enable smart standby */