summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-03-07 14:21:44 +0100
committerFelipe Balbi <balbi@ti.com>2013-03-18 10:18:14 +0100
commit2ba7943af0f0cca5a069cd3aff807815bc76fff1 (patch)
tree4991deda3224f2f73524a1e44f6443e1f8264f42 /drivers/usb/dwc3
parentusb: dwc3: set dma_mask for dwc3_omap device (diff)
downloadlinux-2ba7943af0f0cca5a069cd3aff807815bc76fff1.tar.xz
linux-2ba7943af0f0cca5a069cd3aff807815bc76fff1.zip
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)
writel(value, base + offset);
}
-void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
+int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
{
u32 val;
struct dwc3_omap *omap = _omap;
+ if (!omap)
+ return -EPROBE_DEFER;
+
switch (status) {
case OMAP_DWC3_ID_GROUND:
dev_dbg(omap->dev, "ID GND\n");
@@ -185,7 +188,7 @@ void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
dev_dbg(omap->dev, "ID float\n");
}
- return;
+ return 0;
}
EXPORT_SYMBOL_GPL(dwc3_omap_mailbox);