From 976f21e1ef42b15955ac04f2add31a630f5903bc Mon Sep 17 00:00:00 2001 From: Vladimir Zapolskiy Date: Fri, 23 Dec 2011 18:37:18 +0200 Subject: [PATCH] --- yaml --- r: 299407 b: refs/heads/master c: afb76df140823c57738598a876cd1d6568cd57c7 h: refs/heads/master i: 299405: 4c4e4836027eb62651d2f68d88e0d9ea55b5bf88 299403: 44a78394435bbfd23347a988cb1e32556f4dcf9b 299399: 58a4e3fc8d88f07ca1fbceb5794992b1446641d0 299391: 9b267327c05c39ba24abee70679017246429370e v: v3 --- [refs] | 2 +- trunk/drivers/usb/musb/omap2430.c | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index fb1b90656e6d..3905cab88e2c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ecb07797ffc1c2aaa2e58d1ba1b5deea44ea5b9e +refs/heads/master: afb76df140823c57738598a876cd1d6568cd57c7 diff --git a/trunk/drivers/usb/musb/omap2430.c b/trunk/drivers/usb/musb/omap2430.c index 2ae0bb309994..11b571ec22f2 100644 --- a/trunk/drivers/usb/musb/omap2430.c +++ b/trunk/drivers/usb/musb/omap2430.c @@ -491,11 +491,13 @@ static int omap2430_runtime_suspend(struct device *dev) struct omap2430_glue *glue = dev_get_drvdata(dev); struct musb *musb = glue_to_musb(glue); - musb->context.otg_interfsel = musb_readl(musb->mregs, - OTG_INTERFSEL); + if (musb) { + musb->context.otg_interfsel = musb_readl(musb->mregs, + OTG_INTERFSEL); - omap2430_low_level_exit(musb); - usb_phy_set_suspend(musb->xceiv, 1); + omap2430_low_level_exit(musb); + usb_phy_set_suspend(musb->xceiv, 1); + } return 0; } @@ -505,11 +507,13 @@ static int omap2430_runtime_resume(struct device *dev) struct omap2430_glue *glue = dev_get_drvdata(dev); struct musb *musb = glue_to_musb(glue); - omap2430_low_level_init(musb); - musb_writel(musb->mregs, OTG_INTERFSEL, - musb->context.otg_interfsel); + if (musb) { + omap2430_low_level_init(musb); + musb_writel(musb->mregs, OTG_INTERFSEL, + musb->context.otg_interfsel); - usb_phy_set_suspend(musb->xceiv, 0); + usb_phy_set_suspend(musb->xceiv, 0); + } return 0; }