From ce1972e58d8bbf1b1dd0cf67c541bb77596f4bdb Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 31 Mar 2008 14:23:20 +0300 Subject: [PATCH] musb_hdrc: Check for set_suspend and set_resume functions Check for set_suspend and set_resume functions Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2430.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 */ -- 2.41.3