aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/atm/cxacru.c2
-rw-r--r--drivers/usb/atm/speedtch.c28
-rw-r--r--drivers/usb/gadget/u_ether.c4
-rw-r--r--drivers/usb/host/ohci-hcd.c3
-rw-r--r--drivers/usb/otg/isp1301_omap.c2
-rw-r--r--drivers/usb/serial/oti6858.c5
6 files changed, 22 insertions, 22 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index f383cb42b1d7..a845f8b8382f 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -1247,7 +1247,7 @@ static void cxacru_unbind(struct usbatm_data *usbatm_instance,
1247 mutex_unlock(&instance->poll_state_serialize); 1247 mutex_unlock(&instance->poll_state_serialize);
1248 1248
1249 if (is_polling) 1249 if (is_polling)
1250 cancel_rearming_delayed_work(&instance->poll_work); 1250 cancel_delayed_work_sync(&instance->poll_work);
1251 1251
1252 usb_kill_urb(instance->snd_urb); 1252 usb_kill_urb(instance->snd_urb);
1253 usb_kill_urb(instance->rcv_urb); 1253 usb_kill_urb(instance->rcv_urb);
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 4716e707de59..0842cfbf60cf 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -139,7 +139,8 @@ struct speedtch_instance_data {
139 139
140 struct speedtch_params params; /* set in probe, constant afterwards */ 140 struct speedtch_params params; /* set in probe, constant afterwards */
141 141
142 struct delayed_work status_checker; 142 struct timer_list status_check_timer;
143 struct work_struct status_check_work;
143 144
144 unsigned char last_status; 145 unsigned char last_status;
145 146
@@ -498,7 +499,7 @@ static void speedtch_check_status(struct work_struct *work)
498{ 499{
499 struct speedtch_instance_data *instance = 500 struct speedtch_instance_data *instance =
500 container_of(work, struct speedtch_instance_data, 501 container_of(work, struct speedtch_instance_data,
501 status_checker.work); 502 status_check_work);
502 struct usbatm_data *usbatm = instance->usbatm; 503 struct usbatm_data *usbatm = instance->usbatm;
503 struct atm_dev *atm_dev = usbatm->atm_dev; 504 struct atm_dev *atm_dev = usbatm->atm_dev;
504 unsigned char *buf = instance->scratch_buffer; 505 unsigned char *buf = instance->scratch_buffer;
@@ -575,11 +576,11 @@ static void speedtch_status_poll(unsigned long data)
575{ 576{
576 struct speedtch_instance_data *instance = (void *)data; 577 struct speedtch_instance_data *instance = (void *)data;
577 578
578 schedule_delayed_work(&instance->status_checker, 0); 579 schedule_work(&instance->status_check_work);
579 580
580 /* The following check is racy, but the race is harmless */ 581 /* The following check is racy, but the race is harmless */
581 if (instance->poll_delay < MAX_POLL_DELAY) 582 if (instance->poll_delay < MAX_POLL_DELAY)
582 mod_timer(&instance->status_checker.timer, jiffies + msecs_to_jiffies(instance->poll_delay)); 583 mod_timer(&instance->status_check_timer, jiffies + msecs_to_jiffies(instance->poll_delay));
583 else 584 else
584 atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n"); 585 atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n");
585} 586}
@@ -595,7 +596,7 @@ static void speedtch_resubmit_int(unsigned long data)
595 if (int_urb) { 596 if (int_urb) {
596 ret = usb_submit_urb(int_urb, GFP_ATOMIC); 597 ret = usb_submit_urb(int_urb, GFP_ATOMIC);
597 if (!ret) 598 if (!ret)
598 schedule_delayed_work(&instance->status_checker, 0); 599 schedule_work(&instance->status_check_work);
599 else { 600 else {
600 atm_dbg(instance->usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); 601 atm_dbg(instance->usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret);
601 mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY)); 602 mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY));
@@ -624,7 +625,7 @@ static void speedtch_handle_int(struct urb *int_urb)
624 } 625 }
625 626
626 if ((count == 6) && !memcmp(up_int, instance->int_data, 6)) { 627 if ((count == 6) && !memcmp(up_int, instance->int_data, 6)) {
627 del_timer(&instance->status_checker.timer); 628 del_timer(&instance->status_check_timer);
628 atm_info(usbatm, "DSL line goes up\n"); 629 atm_info(usbatm, "DSL line goes up\n");
629 } else if ((count == 6) && !memcmp(down_int, instance->int_data, 6)) { 630 } else if ((count == 6) && !memcmp(down_int, instance->int_data, 6)) {
630 atm_info(usbatm, "DSL line goes down\n"); 631 atm_info(usbatm, "DSL line goes down\n");
@@ -640,7 +641,7 @@ static void speedtch_handle_int(struct urb *int_urb)
640 641
641 if ((int_urb = instance->int_urb)) { 642 if ((int_urb = instance->int_urb)) {
642 ret = usb_submit_urb(int_urb, GFP_ATOMIC); 643 ret = usb_submit_urb(int_urb, GFP_ATOMIC);
643 schedule_delayed_work(&instance->status_checker, 0); 644 schedule_work(&instance->status_check_work);
644 if (ret < 0) { 645 if (ret < 0) {
645 atm_dbg(usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); 646 atm_dbg(usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret);
646 goto fail; 647 goto fail;
@@ -686,7 +687,7 @@ static int speedtch_atm_start(struct usbatm_data *usbatm, struct atm_dev *atm_de
686 } 687 }
687 688
688 /* Start status polling */ 689 /* Start status polling */
689 mod_timer(&instance->status_checker.timer, jiffies + msecs_to_jiffies(1000)); 690 mod_timer(&instance->status_check_timer, jiffies + msecs_to_jiffies(1000));
690 691
691 return 0; 692 return 0;
692} 693}
@@ -698,7 +699,7 @@ static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_de
698 699
699 atm_dbg(usbatm, "%s entered\n", __func__); 700 atm_dbg(usbatm, "%s entered\n", __func__);
700 701
701 del_timer_sync(&instance->status_checker.timer); 702 del_timer_sync(&instance->status_check_timer);
702 703
703 /* 704 /*
704 * Since resubmit_timer and int_urb can schedule themselves and 705 * Since resubmit_timer and int_urb can schedule themselves and
@@ -717,7 +718,7 @@ static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_de
717 del_timer_sync(&instance->resubmit_timer); 718 del_timer_sync(&instance->resubmit_timer);
718 usb_free_urb(int_urb); 719 usb_free_urb(int_urb);
719 720
720 flush_scheduled_work(); 721 flush_work_sync(&instance->status_check_work);
721} 722}
722 723
723static int speedtch_pre_reset(struct usb_interface *intf) 724static int speedtch_pre_reset(struct usb_interface *intf)
@@ -869,10 +870,11 @@ static int speedtch_bind(struct usbatm_data *usbatm,
869 870
870 usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); 871 usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0);
871 872
872 INIT_DELAYED_WORK(&instance->status_checker, speedtch_check_status); 873 INIT_WORK(&instance->status_check_work, speedtch_check_status);
874 init_timer(&instance->status_check_timer);
873 875
874 instance->status_checker.timer.function = speedtch_status_poll; 876 instance->status_check_timer.function = speedtch_status_poll;
875 instance->status_checker.timer.data = (unsigned long)instance; 877 instance->status_check_timer.data = (unsigned long)instance;
876 instance->last_status = 0xff; 878 instance->last_status = 0xff;
877 instance->poll_delay = MIN_POLL_DELAY; 879 instance->poll_delay = MIN_POLL_DELAY;
878 880
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index e3454fe46b47..1eda968b5644 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -839,11 +839,9 @@ void gether_cleanup(void)
839 return; 839 return;
840 840
841 unregister_netdev(the_dev->net); 841 unregister_netdev(the_dev->net);
842 flush_work_sync(&the_dev->work);
842 free_netdev(the_dev->net); 843 free_netdev(the_dev->net);
843 844
844 /* assuming we used keventd, it must quiesce too */
845 flush_scheduled_work();
846
847 the_dev = NULL; 845 the_dev = NULL;
848} 846}
849 847
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 9751647665df..759a12ff8048 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -901,7 +901,8 @@ static void ohci_stop (struct usb_hcd *hcd)
901 901
902 ohci_dump (ohci, 1); 902 ohci_dump (ohci, 1);
903 903
904 flush_scheduled_work(); 904 if (quirk_nec(ohci))
905 flush_work_sync(&ohci->nec_work);
905 906
906 ohci_usb_reset (ohci); 907 ohci_usb_reset (ohci);
907 ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); 908 ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
index 456969492410..e00fa1b22ecd 100644
--- a/drivers/usb/otg/isp1301_omap.c
+++ b/drivers/usb/otg/isp1301_omap.c
@@ -1247,7 +1247,7 @@ static int __exit isp1301_remove(struct i2c_client *i2c)
1247 isp->timer.data = 0; 1247 isp->timer.data = 0;
1248 set_bit(WORK_STOP, &isp->todo); 1248 set_bit(WORK_STOP, &isp->todo);
1249 del_timer_sync(&isp->timer); 1249 del_timer_sync(&isp->timer);
1250 flush_scheduled_work(); 1250 flush_work_sync(&isp->work);
1251 1251
1252 put_device(&i2c->dev); 1252 put_device(&i2c->dev);
1253 the_transceiver = NULL; 1253 the_transceiver = NULL;
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index e199b0f4f99c..5be866bb7a41 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -613,9 +613,8 @@ static void oti6858_close(struct usb_serial_port *port)
613 dbg("%s(): after buf_clear()", __func__); 613 dbg("%s(): after buf_clear()", __func__);
614 614
615 /* cancel scheduled setup */ 615 /* cancel scheduled setup */
616 cancel_delayed_work(&priv->delayed_setup_work); 616 cancel_delayed_work_sync(&priv->delayed_setup_work);
617 cancel_delayed_work(&priv->delayed_write_work); 617 cancel_delayed_work_sync(&priv->delayed_write_work);
618 flush_scheduled_work();
619 618
620 /* shutdown our urbs */ 619 /* shutdown our urbs */
621 dbg("%s(): shutting down urbs", __func__); 620 dbg("%s(): shutting down urbs", __func__);