aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-10-11 01:07:40 -0400
committerFelipe Balbi <balbi@ti.com>2011-10-13 13:41:52 -0400
commit034d7c13a79c67d3b52dd782d68e6c324613878a (patch)
tree7fb097e30b0ac121450101da3f9ddfbb8f5f60a2 /drivers/usb/renesas_usbhs/mod.c
parente2eddc6103c7f00a2a1a0dfe5fac494d039b099a (diff)
usb: gadget: renesas_usbhs: add mod_host support
This is mod_host prototype support for renesas_usbhs driver. It doesn't support USB-Hub, and USB-DMAC for now. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
index 993c2ca4f0ca..2d3b09d0d846 100644
--- a/drivers/usb/renesas_usbhs/mod.c
+++ b/drivers/usb/renesas_usbhs/mod.c
@@ -140,10 +140,14 @@ int usbhs_mod_probe(struct usbhs_priv *priv)
140 /* 140 /*
141 * install host/gadget driver 141 * install host/gadget driver
142 */ 142 */
143 ret = usbhs_mod_gadget_probe(priv); 143 ret = usbhs_mod_host_probe(priv);
144 if (ret < 0) 144 if (ret < 0)
145 return ret; 145 return ret;
146 146
147 ret = usbhs_mod_gadget_probe(priv);
148 if (ret < 0)
149 goto mod_init_host_err;
150
147 /* irq settings */ 151 /* irq settings */
148 ret = request_irq(priv->irq, usbhs_interrupt, 152 ret = request_irq(priv->irq, usbhs_interrupt,
149 0, dev_name(dev), priv); 153 0, dev_name(dev), priv);
@@ -156,12 +160,15 @@ int usbhs_mod_probe(struct usbhs_priv *priv)
156 160
157mod_init_gadget_err: 161mod_init_gadget_err:
158 usbhs_mod_gadget_remove(priv); 162 usbhs_mod_gadget_remove(priv);
163mod_init_host_err:
164 usbhs_mod_host_remove(priv);
159 165
160 return ret; 166 return ret;
161} 167}
162 168
163void usbhs_mod_remove(struct usbhs_priv *priv) 169void usbhs_mod_remove(struct usbhs_priv *priv)
164{ 170{
171 usbhs_mod_host_remove(priv);
165 usbhs_mod_gadget_remove(priv); 172 usbhs_mod_gadget_remove(priv);
166 free_irq(priv->irq, priv); 173 free_irq(priv->irq, priv);
167} 174}