aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-03-07 08:21:44 -0500
committerFelipe Balbi <balbi@ti.com>2013-03-18 05:18:14 -0400
commit2ba7943af0f0cca5a069cd3aff807815bc76fff1 (patch)
tree4991deda3224f2f73524a1e44f6443e1f8264f42 /drivers/usb/dwc3
parentddff14f1ab9b55b73ba59126ef4a10966725fc9d (diff)
usb: dwc3: dwc3-omap: return -EPROBE_DEFER if probe has not yet executed
return -EPROBE_DEFER from dwc3_omap_mailbox in dwc3-omap.c, if the probe of dwc3-omap has not yet been executed or failed. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/dwc3-omap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 546f1fd84920..2fe9723ff1df 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -138,11 +138,14 @@ static inline void dwc3_omap_writel(void __iomem *base, u32 offset, u32 value)
138 writel(value, base + offset); 138 writel(value, base + offset);
139} 139}
140 140
141void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) 141int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
142{ 142{
143 u32 val; 143 u32 val;
144 struct dwc3_omap *omap = _omap; 144 struct dwc3_omap *omap = _omap;
145 145
146 if (!omap)
147 return -EPROBE_DEFER;
148
146 switch (status) { 149 switch (status) {
147 case OMAP_DWC3_ID_GROUND: 150 case OMAP_DWC3_ID_GROUND:
148 dev_dbg(omap->dev, "ID GND\n"); 151 dev_dbg(omap->dev, "ID GND\n");
@@ -185,7 +188,7 @@ void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
185 dev_dbg(omap->dev, "ID float\n"); 188 dev_dbg(omap->dev, "ID float\n");
186 } 189 }
187 190
188 return; 191 return 0;
189} 192}
190EXPORT_SYMBOL_GPL(dwc3_omap_mailbox); 193EXPORT_SYMBOL_GPL(dwc3_omap_mailbox);
191 194