From: Tony Lindgren Date: Mon, 31 Mar 2008 11:23:20 +0000 (+0300) Subject: musb_hdrc: Check for set_suspend and set_resume functions X-Git-Tag: v2.6.25-omap1~82 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ce1972e58d8bbf1b1dd0cf67c541bb77596f4bdb;p=linux-2.6-omap-h63xx.git musb_hdrc: Check for set_suspend and set_resume functions Check for set_suspend and set_resume functions Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 364d746d635..8041ddecec4 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -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 */