diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-24 10:14:20 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-24 10:14:20 -0500 |
commit | 569ff2de2e1c8ac67c8df3a7367d46d0d9460a35 (patch) | |
tree | 124784a459d055a97506b37ce3d51e9713485922 | |
parent | 37c95bfe944babae817bfcf02c996729c9a3335d (diff) |
usb: don't use flush_scheduled_work()
flush_scheduled_work() is being deprecated. Directly flush or cancel
work items instead.
* u_ether, isp1301_omap, speedtch conversions are straight-forward.
* ochi-hcd should only flush when quirk_nec() is true as otherwise the
work wouldn't have been initialized.
* In oti6858, cancel_delayed_work() + flush_scheduled_work() ->
cancel_delayed_work_sync().
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Duncan Sands <duncan.sands@free.fr>
Cc: linux-usb@vger.kernel.org
-rw-r--r-- | drivers/usb/atm/speedtch.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/u_ether.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 3 | ||||
-rw-r--r-- | drivers/usb/otg/isp1301_omap.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/oti6858.c | 5 |
5 files changed, 7 insertions, 9 deletions
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 9046eba112af..0842cfbf60cf 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
@@ -718,7 +718,7 @@ static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_de | |||
718 | del_timer_sync(&instance->resubmit_timer); | 718 | del_timer_sync(&instance->resubmit_timer); |
719 | usb_free_urb(int_urb); | 719 | usb_free_urb(int_urb); |
720 | 720 | ||
721 | flush_scheduled_work(); | 721 | flush_work_sync(&instance->status_check_work); |
722 | } | 722 | } |
723 | 723 | ||
724 | static int speedtch_pre_reset(struct usb_interface *intf) | 724 | static int speedtch_pre_reset(struct usb_interface *intf) |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index fbe86ca95802..00a78248d764 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -829,11 +829,9 @@ void gether_cleanup(void) | |||
829 | return; | 829 | return; |
830 | 830 | ||
831 | unregister_netdev(the_dev->net); | 831 | unregister_netdev(the_dev->net); |
832 | flush_work_sync(&the_dev->work); | ||
832 | free_netdev(the_dev->net); | 833 | free_netdev(the_dev->net); |
833 | 834 | ||
834 | /* assuming we used keventd, it must quiesce too */ | ||
835 | flush_scheduled_work(); | ||
836 | |||
837 | the_dev = NULL; | 835 | the_dev = NULL; |
838 | } | 836 | } |
839 | 837 | ||
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 5179acb7aa2f..bd5eff77d0cc 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__); |