diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-04-05 11:40:54 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 16:07:07 -0700 |
commit | 2f98382dcdfe1f0048b447da35f34507ffb514dc (patch) | |
tree | 2b488080471eceb387de0f7ccb22d8a8c12be403 /drivers/usb/renesas_usbhs/mod.c | |
parent | f1407d5c66240b33d11a7f1a41d55ccf6a9d7647 (diff) | |
download | op-kernel-dev-2f98382dcdfe1f0048b447da35f34507ffb514dc.zip op-kernel-dev-2f98382dcdfe1f0048b447da35f34507ffb514dc.tar.gz |
usb: renesas_usbhs: Add Renesas USBHS Gadget
This patch add usb gadget code to SuperH USBHS.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c index 4a33984..73604a1 100644 --- a/drivers/usb/renesas_usbhs/mod.c +++ b/drivers/usb/renesas_usbhs/mod.c @@ -94,17 +94,32 @@ int usbhs_mod_probe(struct usbhs_priv *priv) struct device *dev = usbhs_priv_to_dev(priv); int ret; + /* + * install host/gadget driver + */ + ret = usbhs_mod_gadget_probe(priv); + if (ret < 0) + return ret; + /* irq settings */ ret = request_irq(priv->irq, usbhs_interrupt, IRQF_DISABLED, dev_name(dev), priv); - if (ret) + if (ret) { dev_err(dev, "irq request err\n"); + goto mod_init_gadget_err; + } + + return ret; + +mod_init_gadget_err: + usbhs_mod_gadget_remove(priv); return ret; } void usbhs_mod_remove(struct usbhs_priv *priv) { + usbhs_mod_gadget_remove(priv); free_irq(priv->irq, priv); } |