aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/renesas_usbhs/common.c')
-rw-r--r--drivers/usb/renesas_usbhs/common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index db13cef9effe..9a75a45687bb 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -178,7 +178,7 @@ static void usbhsc_notify_hotplug(struct work_struct *work)
178{ 178{
179 struct usbhs_priv *priv = container_of(work, 179 struct usbhs_priv *priv = container_of(work,
180 struct usbhs_priv, 180 struct usbhs_priv,
181 notify_hotplug_work); 181 notify_hotplug_work.work);
182 struct platform_device *pdev = usbhs_priv_to_pdev(priv); 182 struct platform_device *pdev = usbhs_priv_to_pdev(priv);
183 struct usbhs_mod *mod = usbhs_mod_get_current(priv); 183 struct usbhs_mod *mod = usbhs_mod_get_current(priv);
184 int id; 184 int id;
@@ -224,16 +224,17 @@ static void usbhsc_notify_hotplug(struct work_struct *work)
224 } 224 }
225} 225}
226 226
227static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev) 227int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
228{ 228{
229 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); 229 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
230 int delay = usbhs_get_dparam(priv, detection_delay);
230 231
231 /* 232 /*
232 * This functions will be called in interrupt. 233 * This functions will be called in interrupt.
233 * To make sure safety context, 234 * To make sure safety context,
234 * use workqueue for usbhs_notify_hotplug 235 * use workqueue for usbhs_notify_hotplug
235 */ 236 */
236 schedule_work(&priv->notify_hotplug_work); 237 schedule_delayed_work(&priv->notify_hotplug_work, delay);
237 return 0; 238 return 0;
238} 239}
239 240
@@ -300,7 +301,7 @@ static int __devinit usbhs_probe(struct platform_device *pdev)
300 */ 301 */
301 priv->irq = irq; 302 priv->irq = irq;
302 priv->pdev = pdev; 303 priv->pdev = pdev;
303 INIT_WORK(&priv->notify_hotplug_work, usbhsc_notify_hotplug); 304 INIT_DELAYED_WORK(&priv->notify_hotplug_work, usbhsc_notify_hotplug);
304 spin_lock_init(usbhs_priv_to_lock(priv)); 305 spin_lock_init(usbhs_priv_to_lock(priv));
305 306
306 /* call pipe and module init */ 307 /* call pipe and module init */