aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
index 4a3398484cd7..73604a1d6843 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)
94 struct device *dev = usbhs_priv_to_dev(priv); 94 struct device *dev = usbhs_priv_to_dev(priv);
95 int ret; 95 int ret;
96 96
97 /*
98 * install host/gadget driver
99 */
100 ret = usbhs_mod_gadget_probe(priv);
101 if (ret < 0)
102 return ret;
103
97 /* irq settings */ 104 /* irq settings */
98 ret = request_irq(priv->irq, usbhs_interrupt, 105 ret = request_irq(priv->irq, usbhs_interrupt,
99 IRQF_DISABLED, dev_name(dev), priv); 106 IRQF_DISABLED, dev_name(dev), priv);
100 if (ret) 107 if (ret) {
101 dev_err(dev, "irq request err\n"); 108 dev_err(dev, "irq request err\n");
109 goto mod_init_gadget_err;
110 }
111
112 return ret;
113
114mod_init_gadget_err:
115 usbhs_mod_gadget_remove(priv);
102 116
103 return ret; 117 return ret;
104} 118}
105 119
106void usbhs_mod_remove(struct usbhs_priv *priv) 120void usbhs_mod_remove(struct usbhs_priv *priv)
107{ 121{
122 usbhs_mod_gadget_remove(priv);
108 free_irq(priv->irq, priv); 123 free_irq(priv->irq, priv);
109} 124}
110 125