diff options
Diffstat (limited to 'drivers')
93 files changed, 157 insertions, 212 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index a7d6347aaa79..17c675c52295 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -672,7 +672,6 @@ static void __reschedule_timeout(int drive, const char *message) | |||
672 | 672 | ||
673 | if (drive == current_reqD) | 673 | if (drive == current_reqD) |
674 | drive = current_drive; | 674 | drive = current_drive; |
675 | __cancel_delayed_work(&fd_timeout); | ||
676 | 675 | ||
677 | if (drive < 0 || drive >= N_DRIVE) { | 676 | if (drive < 0 || drive >= N_DRIVE) { |
678 | delay = 20UL * HZ; | 677 | delay = 20UL * HZ; |
@@ -680,7 +679,7 @@ static void __reschedule_timeout(int drive, const char *message) | |||
680 | } else | 679 | } else |
681 | delay = UDP->timeout; | 680 | delay = UDP->timeout; |
682 | 681 | ||
683 | queue_delayed_work(floppy_wq, &fd_timeout, delay); | 682 | mod_delayed_work(floppy_wq, &fd_timeout, delay); |
684 | if (UDP->flags & FD_DEBUG) | 683 | if (UDP->flags & FD_DEBUG) |
685 | DPRINT("reschedule timeout %s\n", message); | 684 | DPRINT("reschedule timeout %s\n", message); |
686 | timeout_message = message; | 685 | timeout_message = message; |
@@ -891,7 +890,7 @@ static void unlock_fdc(void) | |||
891 | 890 | ||
892 | raw_cmd = NULL; | 891 | raw_cmd = NULL; |
893 | command_status = FD_COMMAND_NONE; | 892 | command_status = FD_COMMAND_NONE; |
894 | __cancel_delayed_work(&fd_timeout); | 893 | cancel_delayed_work(&fd_timeout); |
895 | do_floppy = NULL; | 894 | do_floppy = NULL; |
896 | cont = NULL; | 895 | cont = NULL; |
897 | clear_bit(0, &fdc_busy); | 896 | clear_bit(0, &fdc_busy); |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 2c2d2e5c1597..007db8986e84 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -670,7 +670,7 @@ static void xlvbd_release_gendisk(struct blkfront_info *info) | |||
670 | spin_unlock_irqrestore(&info->io_lock, flags); | 670 | spin_unlock_irqrestore(&info->io_lock, flags); |
671 | 671 | ||
672 | /* Flush gnttab callback work. Must be done with no locks held. */ | 672 | /* Flush gnttab callback work. Must be done with no locks held. */ |
673 | flush_work_sync(&info->work); | 673 | flush_work(&info->work); |
674 | 674 | ||
675 | del_gendisk(info->gd); | 675 | del_gendisk(info->gd); |
676 | 676 | ||
@@ -719,7 +719,7 @@ static void blkif_free(struct blkfront_info *info, int suspend) | |||
719 | spin_unlock_irq(&info->io_lock); | 719 | spin_unlock_irq(&info->io_lock); |
720 | 720 | ||
721 | /* Flush gnttab callback work. Must be done with no locks held. */ | 721 | /* Flush gnttab callback work. Must be done with no locks held. */ |
722 | flush_work_sync(&info->work); | 722 | flush_work(&info->work); |
723 | 723 | ||
724 | /* Free resources associated with old device channel. */ | 724 | /* Free resources associated with old device channel. */ |
725 | if (info->ring_ref != GRANT_INVALID_REF) { | 725 | if (info->ring_ref != GRANT_INVALID_REF) { |
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 3ceaf006e7f0..75d485afe56c 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
@@ -840,7 +840,7 @@ probe_fail_no_mem: | |||
840 | 840 | ||
841 | static int __devexit remove_gdrom(struct platform_device *devptr) | 841 | static int __devexit remove_gdrom(struct platform_device *devptr) |
842 | { | 842 | { |
843 | flush_work_sync(&work); | 843 | flush_work(&work); |
844 | blk_cleanup_queue(gd.gdrom_rq); | 844 | blk_cleanup_queue(gd.gdrom_rq); |
845 | free_irq(HW_EVENT_GDROM_CMD, &gd); | 845 | free_irq(HW_EVENT_GDROM_CMD, &gd); |
846 | free_irq(HW_EVENT_GDROM_DMA, &gd); | 846 | free_irq(HW_EVENT_GDROM_DMA, &gd); |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index f87780502b41..320debbe32fa 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1433,7 +1433,7 @@ static int __devexit sonypi_remove(struct platform_device *dev) | |||
1433 | sonypi_disable(); | 1433 | sonypi_disable(); |
1434 | 1434 | ||
1435 | synchronize_irq(sonypi_device.irq); | 1435 | synchronize_irq(sonypi_device.irq); |
1436 | flush_work_sync(&sonypi_device.input_work); | 1436 | flush_work(&sonypi_device.input_work); |
1437 | 1437 | ||
1438 | if (useinput) { | 1438 | if (useinput) { |
1439 | input_unregister_device(sonypi_device.input_key_dev); | 1439 | input_unregister_device(sonypi_device.input_key_dev); |
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 817f0ee202b6..3af9f4d1a23f 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -1172,7 +1172,7 @@ int tpm_release(struct inode *inode, struct file *file) | |||
1172 | struct tpm_chip *chip = file->private_data; | 1172 | struct tpm_chip *chip = file->private_data; |
1173 | 1173 | ||
1174 | del_singleshot_timer_sync(&chip->user_read_timer); | 1174 | del_singleshot_timer_sync(&chip->user_read_timer); |
1175 | flush_work_sync(&chip->work); | 1175 | flush_work(&chip->work); |
1176 | file->private_data = NULL; | 1176 | file->private_data = NULL; |
1177 | atomic_set(&chip->data_pending, 0); | 1177 | atomic_set(&chip->data_pending, 0); |
1178 | kfree(chip->data_buffer); | 1178 | kfree(chip->data_buffer); |
@@ -1225,7 +1225,7 @@ ssize_t tpm_read(struct file *file, char __user *buf, | |||
1225 | int rc; | 1225 | int rc; |
1226 | 1226 | ||
1227 | del_singleshot_timer_sync(&chip->user_read_timer); | 1227 | del_singleshot_timer_sync(&chip->user_read_timer); |
1228 | flush_work_sync(&chip->work); | 1228 | flush_work(&chip->work); |
1229 | ret_size = atomic_read(&chip->data_pending); | 1229 | ret_size = atomic_read(&chip->data_pending); |
1230 | atomic_set(&chip->data_pending, 0); | 1230 | atomic_set(&chip->data_pending, 0); |
1231 | if (ret_size > 0) { /* relay data */ | 1231 | if (ret_size > 0) { /* relay data */ |
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 235a340e81f2..55f0354864e2 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -466,7 +466,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) | |||
466 | delay -= jiffies % delay; | 466 | delay -= jiffies % delay; |
467 | 467 | ||
468 | dbs_info->enable = 1; | 468 | dbs_info->enable = 1; |
469 | INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer); | 469 | INIT_DEFERRABLE_WORK(&dbs_info->work, do_dbs_timer); |
470 | schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay); | 470 | schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay); |
471 | } | 471 | } |
472 | 472 | ||
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 836e9b062e5e..14c1af5a264f 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -644,7 +644,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) | |||
644 | delay -= jiffies % delay; | 644 | delay -= jiffies % delay; |
645 | 645 | ||
646 | dbs_info->sample_type = DBS_NORMAL_SAMPLE; | 646 | dbs_info->sample_type = DBS_NORMAL_SAMPLE; |
647 | INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer); | 647 | INIT_DEFERRABLE_WORK(&dbs_info->work, do_dbs_timer); |
648 | schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay); | 648 | schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay); |
649 | } | 649 | } |
650 | 650 | ||
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 70c31d43fff3..b146d76f04cf 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
@@ -607,7 +607,7 @@ static int __init devfreq_start_polling(void) | |||
607 | mutex_lock(&devfreq_list_lock); | 607 | mutex_lock(&devfreq_list_lock); |
608 | polling = false; | 608 | polling = false; |
609 | devfreq_wq = create_freezable_workqueue("devfreq_wq"); | 609 | devfreq_wq = create_freezable_workqueue("devfreq_wq"); |
610 | INIT_DELAYED_WORK_DEFERRABLE(&devfreq_work, devfreq_monitor); | 610 | INIT_DEFERRABLE_WORK(&devfreq_work, devfreq_monitor); |
611 | mutex_unlock(&devfreq_list_lock); | 611 | mutex_unlock(&devfreq_list_lock); |
612 | 612 | ||
613 | devfreq_monitor(&devfreq_work.work); | 613 | devfreq_monitor(&devfreq_work.work); |
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index d5dc9da7f99f..90f0b730e9bb 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -559,7 +559,7 @@ static void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec) | |||
559 | return; | 559 | return; |
560 | 560 | ||
561 | INIT_DELAYED_WORK(&mci->work, edac_mc_workq_function); | 561 | INIT_DELAYED_WORK(&mci->work, edac_mc_workq_function); |
562 | queue_delayed_work(edac_workqueue, &mci->work, msecs_to_jiffies(msec)); | 562 | mod_delayed_work(edac_workqueue, &mci->work, msecs_to_jiffies(msec)); |
563 | } | 563 | } |
564 | 564 | ||
565 | /* | 565 | /* |
@@ -599,21 +599,6 @@ void edac_mc_reset_delay_period(int value) | |||
599 | 599 | ||
600 | mutex_lock(&mem_ctls_mutex); | 600 | mutex_lock(&mem_ctls_mutex); |
601 | 601 | ||
602 | /* scan the list and turn off all workq timers, doing so under lock | ||
603 | */ | ||
604 | list_for_each(item, &mc_devices) { | ||
605 | mci = list_entry(item, struct mem_ctl_info, link); | ||
606 | |||
607 | if (mci->op_state == OP_RUNNING_POLL) | ||
608 | cancel_delayed_work(&mci->work); | ||
609 | } | ||
610 | |||
611 | mutex_unlock(&mem_ctls_mutex); | ||
612 | |||
613 | |||
614 | /* re-walk the list, and reset the poll delay */ | ||
615 | mutex_lock(&mem_ctls_mutex); | ||
616 | |||
617 | list_for_each(item, &mc_devices) { | 602 | list_for_each(item, &mc_devices) { |
618 | mci = list_entry(item, struct mem_ctl_info, link); | 603 | mci = list_entry(item, struct mem_ctl_info, link); |
619 | 604 | ||
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index 60ac3fbb4cde..725eb5aa8d8c 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c | |||
@@ -143,7 +143,7 @@ static int __devinit adc_jack_probe(struct platform_device *pdev) | |||
143 | 143 | ||
144 | data->handling_delay = msecs_to_jiffies(pdata->handling_delay_ms); | 144 | data->handling_delay = msecs_to_jiffies(pdata->handling_delay_ms); |
145 | 145 | ||
146 | INIT_DELAYED_WORK_DEFERRABLE(&data->handler, adc_jack_handler); | 146 | INIT_DEFERRABLE_WORK(&data->handler, adc_jack_handler); |
147 | 147 | ||
148 | platform_set_drvdata(pdev, data); | 148 | platform_set_drvdata(pdev, data); |
149 | 149 | ||
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 3252e7067d8b..8fa9d52820d9 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -968,7 +968,7 @@ static void output_poll_execute(struct work_struct *work) | |||
968 | } | 968 | } |
969 | 969 | ||
970 | if (repoll) | 970 | if (repoll) |
971 | queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD); | 971 | schedule_delayed_work(delayed_work, DRM_OUTPUT_POLL_PERIOD); |
972 | } | 972 | } |
973 | 973 | ||
974 | void drm_kms_helper_poll_disable(struct drm_device *dev) | 974 | void drm_kms_helper_poll_disable(struct drm_device *dev) |
@@ -993,7 +993,7 @@ void drm_kms_helper_poll_enable(struct drm_device *dev) | |||
993 | } | 993 | } |
994 | 994 | ||
995 | if (poll) | 995 | if (poll) |
996 | queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); | 996 | schedule_delayed_work(&dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); |
997 | } | 997 | } |
998 | EXPORT_SYMBOL(drm_kms_helper_poll_enable); | 998 | EXPORT_SYMBOL(drm_kms_helper_poll_enable); |
999 | 999 | ||
@@ -1020,6 +1020,6 @@ void drm_helper_hpd_irq_event(struct drm_device *dev) | |||
1020 | /* kill timer and schedule immediate execution, this doesn't block */ | 1020 | /* kill timer and schedule immediate execution, this doesn't block */ |
1021 | cancel_delayed_work(&dev->mode_config.output_poll_work); | 1021 | cancel_delayed_work(&dev->mode_config.output_poll_work); |
1022 | if (drm_kms_helper_poll) | 1022 | if (drm_kms_helper_poll) |
1023 | queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, 0); | 1023 | schedule_delayed_work(&dev->mode_config.output_poll_work, 0); |
1024 | } | 1024 | } |
1025 | EXPORT_SYMBOL(drm_helper_hpd_irq_event); | 1025 | EXPORT_SYMBOL(drm_helper_hpd_irq_event); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 1065e90d0919..2526e82bea32 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c | |||
@@ -878,7 +878,7 @@ static int g2d_suspend(struct device *dev) | |||
878 | /* FIXME: good range? */ | 878 | /* FIXME: good range? */ |
879 | usleep_range(500, 1000); | 879 | usleep_range(500, 1000); |
880 | 880 | ||
881 | flush_work_sync(&g2d->runqueue_work); | 881 | flush_work(&g2d->runqueue_work); |
882 | 882 | ||
883 | return 0; | 883 | return 0; |
884 | } | 884 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gpio.c b/drivers/gpu/drm/nouveau/nouveau_gpio.c index 82c19e82ff02..0fe4e17c461d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gpio.c +++ b/drivers/gpu/drm/nouveau/nouveau_gpio.c | |||
@@ -302,7 +302,7 @@ nouveau_gpio_isr_del(struct drm_device *dev, int idx, u8 tag, u8 line, | |||
302 | spin_unlock_irqrestore(&pgpio->lock, flags); | 302 | spin_unlock_irqrestore(&pgpio->lock, flags); |
303 | 303 | ||
304 | list_for_each_entry_safe(isr, tmp, &tofree, head) { | 304 | list_for_each_entry_safe(isr, tmp, &tofree, head) { |
305 | flush_work_sync(&isr->work); | 305 | flush_work(&isr->work); |
306 | kfree(isr); | 306 | kfree(isr); |
307 | } | 307 | } |
308 | } | 308 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index afaa1727abd2..50b596ec7b7e 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c | |||
@@ -277,7 +277,7 @@ void radeon_irq_kms_fini(struct radeon_device *rdev) | |||
277 | if (rdev->msi_enabled) | 277 | if (rdev->msi_enabled) |
278 | pci_disable_msi(rdev->pdev); | 278 | pci_disable_msi(rdev->pdev); |
279 | } | 279 | } |
280 | flush_work_sync(&rdev->hotplug_work); | 280 | flush_work(&rdev->hotplug_work); |
281 | } | 281 | } |
282 | 282 | ||
283 | /** | 283 | /** |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index 3c447bf317cb..a32f2e96dd02 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | |||
@@ -594,7 +594,7 @@ int vmw_fb_off(struct vmw_private *vmw_priv) | |||
594 | par->dirty.active = false; | 594 | par->dirty.active = false; |
595 | spin_unlock_irqrestore(&par->dirty.lock, flags); | 595 | spin_unlock_irqrestore(&par->dirty.lock, flags); |
596 | 596 | ||
597 | flush_delayed_work_sync(&info->deferred_work); | 597 | flush_delayed_work(&info->deferred_work); |
598 | 598 | ||
599 | par->bo_ptr = NULL; | 599 | par->bo_ptr = NULL; |
600 | ttm_bo_kunmap(&par->map); | 600 | ttm_bo_kunmap(&par->map); |
diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c index 0008a512211d..eb003574b634 100644 --- a/drivers/hid/hid-picolcd_fb.c +++ b/drivers/hid/hid-picolcd_fb.c | |||
@@ -608,7 +608,7 @@ void picolcd_exit_framebuffer(struct picolcd_data *data) | |||
608 | /* make sure there is no running update - thus that fbdata->picolcd | 608 | /* make sure there is no running update - thus that fbdata->picolcd |
609 | * once obtained under lock is guaranteed not to get free() under | 609 | * once obtained under lock is guaranteed not to get free() under |
610 | * the feet of the deferred work */ | 610 | * the feet of the deferred work */ |
611 | flush_delayed_work_sync(&info->deferred_work); | 611 | flush_delayed_work(&info->deferred_work); |
612 | 612 | ||
613 | data->fb_info = NULL; | 613 | data->fb_info = NULL; |
614 | unregister_framebuffer(info); | 614 | unregister_framebuffer(info); |
diff --git a/drivers/hid/hid-wiimote-ext.c b/drivers/hid/hid-wiimote-ext.c index bc85bf29062e..38ae87772e96 100644 --- a/drivers/hid/hid-wiimote-ext.c +++ b/drivers/hid/hid-wiimote-ext.c | |||
@@ -229,7 +229,7 @@ static void wiiext_worker(struct work_struct *work) | |||
229 | /* schedule work only once, otherwise mark for reschedule */ | 229 | /* schedule work only once, otherwise mark for reschedule */ |
230 | static void wiiext_schedule(struct wiimote_ext *ext) | 230 | static void wiiext_schedule(struct wiimote_ext *ext) |
231 | { | 231 | { |
232 | queue_work(system_nrt_wq, &ext->worker); | 232 | schedule_work(&ext->worker); |
233 | } | 233 | } |
234 | 234 | ||
235 | /* | 235 | /* |
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 28058ae33d38..eaec8d7a3b73 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -152,13 +152,11 @@ static void set_timeout(unsigned long time) | |||
152 | { | 152 | { |
153 | unsigned long delay; | 153 | unsigned long delay; |
154 | 154 | ||
155 | cancel_delayed_work(&work); | ||
156 | |||
157 | delay = time - jiffies; | 155 | delay = time - jiffies; |
158 | if ((long)delay <= 0) | 156 | if ((long)delay <= 0) |
159 | delay = 1; | 157 | delay = 1; |
160 | 158 | ||
161 | queue_delayed_work(addr_wq, &work, delay); | 159 | mod_delayed_work(addr_wq, &work, delay); |
162 | } | 160 | } |
163 | 161 | ||
164 | static void queue_req(struct addr_req *req) | 162 | static void queue_req(struct addr_req *req) |
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index b0d0bc8a6fb6..dc3fd1e8af07 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -2004,7 +2004,7 @@ static void adjust_timeout(struct ib_mad_agent_private *mad_agent_priv) | |||
2004 | unsigned long delay; | 2004 | unsigned long delay; |
2005 | 2005 | ||
2006 | if (list_empty(&mad_agent_priv->wait_list)) { | 2006 | if (list_empty(&mad_agent_priv->wait_list)) { |
2007 | __cancel_delayed_work(&mad_agent_priv->timed_work); | 2007 | cancel_delayed_work(&mad_agent_priv->timed_work); |
2008 | } else { | 2008 | } else { |
2009 | mad_send_wr = list_entry(mad_agent_priv->wait_list.next, | 2009 | mad_send_wr = list_entry(mad_agent_priv->wait_list.next, |
2010 | struct ib_mad_send_wr_private, | 2010 | struct ib_mad_send_wr_private, |
@@ -2013,13 +2013,11 @@ static void adjust_timeout(struct ib_mad_agent_private *mad_agent_priv) | |||
2013 | if (time_after(mad_agent_priv->timeout, | 2013 | if (time_after(mad_agent_priv->timeout, |
2014 | mad_send_wr->timeout)) { | 2014 | mad_send_wr->timeout)) { |
2015 | mad_agent_priv->timeout = mad_send_wr->timeout; | 2015 | mad_agent_priv->timeout = mad_send_wr->timeout; |
2016 | __cancel_delayed_work(&mad_agent_priv->timed_work); | ||
2017 | delay = mad_send_wr->timeout - jiffies; | 2016 | delay = mad_send_wr->timeout - jiffies; |
2018 | if ((long)delay <= 0) | 2017 | if ((long)delay <= 0) |
2019 | delay = 1; | 2018 | delay = 1; |
2020 | queue_delayed_work(mad_agent_priv->qp_info-> | 2019 | mod_delayed_work(mad_agent_priv->qp_info->port_priv->wq, |
2021 | port_priv->wq, | 2020 | &mad_agent_priv->timed_work, delay); |
2022 | &mad_agent_priv->timed_work, delay); | ||
2023 | } | 2021 | } |
2024 | } | 2022 | } |
2025 | } | 2023 | } |
@@ -2052,11 +2050,9 @@ static void wait_for_response(struct ib_mad_send_wr_private *mad_send_wr) | |||
2052 | list_add(&mad_send_wr->agent_list, list_item); | 2050 | list_add(&mad_send_wr->agent_list, list_item); |
2053 | 2051 | ||
2054 | /* Reschedule a work item if we have a shorter timeout */ | 2052 | /* Reschedule a work item if we have a shorter timeout */ |
2055 | if (mad_agent_priv->wait_list.next == &mad_send_wr->agent_list) { | 2053 | if (mad_agent_priv->wait_list.next == &mad_send_wr->agent_list) |
2056 | __cancel_delayed_work(&mad_agent_priv->timed_work); | 2054 | mod_delayed_work(mad_agent_priv->qp_info->port_priv->wq, |
2057 | queue_delayed_work(mad_agent_priv->qp_info->port_priv->wq, | 2055 | &mad_agent_priv->timed_work, delay); |
2058 | &mad_agent_priv->timed_work, delay); | ||
2059 | } | ||
2060 | } | 2056 | } |
2061 | 2057 | ||
2062 | void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr, | 2058 | void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr, |
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index d42c9f435b1b..9e0895b45eb8 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -2679,11 +2679,9 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) | |||
2679 | } | 2679 | } |
2680 | } | 2680 | } |
2681 | if (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_SFP_D) { | 2681 | if (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_SFP_D) { |
2682 | if (nesdev->link_recheck) | ||
2683 | cancel_delayed_work(&nesdev->work); | ||
2684 | nesdev->link_recheck = 1; | 2682 | nesdev->link_recheck = 1; |
2685 | schedule_delayed_work(&nesdev->work, | 2683 | mod_delayed_work(system_wq, &nesdev->work, |
2686 | NES_LINK_RECHECK_DELAY); | 2684 | NES_LINK_RECHECK_DELAY); |
2687 | } | 2685 | } |
2688 | } | 2686 | } |
2689 | 2687 | ||
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index f3a3ecf8d09e..e43f6e41a6bd 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -243,10 +243,9 @@ static int nes_netdev_open(struct net_device *netdev) | |||
243 | 243 | ||
244 | spin_lock_irqsave(&nesdev->nesadapter->phy_lock, flags); | 244 | spin_lock_irqsave(&nesdev->nesadapter->phy_lock, flags); |
245 | if (nesdev->nesadapter->phy_type[nesdev->mac_index] == NES_PHY_TYPE_SFP_D) { | 245 | if (nesdev->nesadapter->phy_type[nesdev->mac_index] == NES_PHY_TYPE_SFP_D) { |
246 | if (nesdev->link_recheck) | ||
247 | cancel_delayed_work(&nesdev->work); | ||
248 | nesdev->link_recheck = 1; | 246 | nesdev->link_recheck = 1; |
249 | schedule_delayed_work(&nesdev->work, NES_LINK_RECHECK_DELAY); | 247 | mod_delayed_work(system_wq, &nesdev->work, |
248 | NES_LINK_RECHECK_DELAY); | ||
250 | } | 249 | } |
251 | spin_unlock_irqrestore(&nesdev->nesadapter->phy_lock, flags); | 250 | spin_unlock_irqrestore(&nesdev->nesadapter->phy_lock, flags); |
252 | 251 | ||
diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c index e7a5e36e1203..76b7d430d03a 100644 --- a/drivers/input/keyboard/qt2160.c +++ b/drivers/input/keyboard/qt2160.c | |||
@@ -156,8 +156,7 @@ static irqreturn_t qt2160_irq(int irq, void *_qt2160) | |||
156 | 156 | ||
157 | spin_lock_irqsave(&qt2160->lock, flags); | 157 | spin_lock_irqsave(&qt2160->lock, flags); |
158 | 158 | ||
159 | __cancel_delayed_work(&qt2160->dwork); | 159 | mod_delayed_work(system_wq, &qt2160->dwork, 0); |
160 | schedule_delayed_work(&qt2160->dwork, 0); | ||
161 | 160 | ||
162 | spin_unlock_irqrestore(&qt2160->lock, flags); | 161 | spin_unlock_irqrestore(&qt2160->lock, flags); |
163 | 162 | ||
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index f14675702c0f..063a174d3a88 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c | |||
@@ -376,12 +376,7 @@ static void synaptics_i2c_reschedule_work(struct synaptics_i2c *touch, | |||
376 | 376 | ||
377 | spin_lock_irqsave(&touch->lock, flags); | 377 | spin_lock_irqsave(&touch->lock, flags); |
378 | 378 | ||
379 | /* | 379 | mod_delayed_work(system_wq, &touch->dwork, delay); |
380 | * If work is already scheduled then subsequent schedules will not | ||
381 | * change the scheduled time that's why we have to cancel it first. | ||
382 | */ | ||
383 | __cancel_delayed_work(&touch->dwork); | ||
384 | schedule_delayed_work(&touch->dwork, delay); | ||
385 | 380 | ||
386 | spin_unlock_irqrestore(&touch->lock, flags); | 381 | spin_unlock_irqrestore(&touch->lock, flags); |
387 | } | 382 | } |
diff --git a/drivers/input/touchscreen/wm831x-ts.c b/drivers/input/touchscreen/wm831x-ts.c index e83410721e38..52abb98a8ae5 100644 --- a/drivers/input/touchscreen/wm831x-ts.c +++ b/drivers/input/touchscreen/wm831x-ts.c | |||
@@ -221,7 +221,7 @@ static void wm831x_ts_input_close(struct input_dev *idev) | |||
221 | synchronize_irq(wm831x_ts->pd_irq); | 221 | synchronize_irq(wm831x_ts->pd_irq); |
222 | 222 | ||
223 | /* Make sure the IRQ completion work is quiesced */ | 223 | /* Make sure the IRQ completion work is quiesced */ |
224 | flush_work_sync(&wm831x_ts->pd_data_work); | 224 | flush_work(&wm831x_ts->pd_data_work); |
225 | 225 | ||
226 | /* If we ended up with the pen down then make sure we revert back | 226 | /* If we ended up with the pen down then make sure we revert back |
227 | * to pen detection state for the next time we start up. | 227 | * to pen detection state for the next time we start up. |
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c index 2602be23f341..84b4b0f7eb99 100644 --- a/drivers/isdn/mISDN/hwchannel.c +++ b/drivers/isdn/mISDN/hwchannel.c | |||
@@ -116,7 +116,7 @@ mISDN_freedchannel(struct dchannel *ch) | |||
116 | } | 116 | } |
117 | skb_queue_purge(&ch->squeue); | 117 | skb_queue_purge(&ch->squeue); |
118 | skb_queue_purge(&ch->rqueue); | 118 | skb_queue_purge(&ch->rqueue); |
119 | flush_work_sync(&ch->workq); | 119 | flush_work(&ch->workq); |
120 | return 0; | 120 | return 0; |
121 | } | 121 | } |
122 | EXPORT_SYMBOL(mISDN_freedchannel); | 122 | EXPORT_SYMBOL(mISDN_freedchannel); |
diff --git a/drivers/leds/leds-lm3533.c b/drivers/leds/leds-lm3533.c index f56b6e7ffdac..f6837b99908c 100644 --- a/drivers/leds/leds-lm3533.c +++ b/drivers/leds/leds-lm3533.c | |||
@@ -737,7 +737,7 @@ err_sysfs_remove: | |||
737 | sysfs_remove_group(&led->cdev.dev->kobj, &lm3533_led_attribute_group); | 737 | sysfs_remove_group(&led->cdev.dev->kobj, &lm3533_led_attribute_group); |
738 | err_unregister: | 738 | err_unregister: |
739 | led_classdev_unregister(&led->cdev); | 739 | led_classdev_unregister(&led->cdev); |
740 | flush_work_sync(&led->work); | 740 | flush_work(&led->work); |
741 | 741 | ||
742 | return ret; | 742 | return ret; |
743 | } | 743 | } |
@@ -751,7 +751,7 @@ static int __devexit lm3533_led_remove(struct platform_device *pdev) | |||
751 | lm3533_ctrlbank_disable(&led->cb); | 751 | lm3533_ctrlbank_disable(&led->cb); |
752 | sysfs_remove_group(&led->cdev.dev->kobj, &lm3533_led_attribute_group); | 752 | sysfs_remove_group(&led->cdev.dev->kobj, &lm3533_led_attribute_group); |
753 | led_classdev_unregister(&led->cdev); | 753 | led_classdev_unregister(&led->cdev); |
754 | flush_work_sync(&led->work); | 754 | flush_work(&led->work); |
755 | 755 | ||
756 | return 0; | 756 | return 0; |
757 | } | 757 | } |
@@ -765,7 +765,7 @@ static void lm3533_led_shutdown(struct platform_device *pdev) | |||
765 | 765 | ||
766 | lm3533_ctrlbank_disable(&led->cb); | 766 | lm3533_ctrlbank_disable(&led->cb); |
767 | lm3533_led_set(&led->cdev, LED_OFF); /* disable blink */ | 767 | lm3533_led_set(&led->cdev, LED_OFF); /* disable blink */ |
768 | flush_work_sync(&led->work); | 768 | flush_work(&led->work); |
769 | } | 769 | } |
770 | 770 | ||
771 | static struct platform_driver lm3533_led_driver = { | 771 | static struct platform_driver lm3533_led_driver = { |
diff --git a/drivers/leds/leds-lp8788.c b/drivers/leds/leds-lp8788.c index 0ade6ebfc914..64009a176651 100644 --- a/drivers/leds/leds-lp8788.c +++ b/drivers/leds/leds-lp8788.c | |||
@@ -172,7 +172,7 @@ static int __devexit lp8788_led_remove(struct platform_device *pdev) | |||
172 | struct lp8788_led *led = platform_get_drvdata(pdev); | 172 | struct lp8788_led *led = platform_get_drvdata(pdev); |
173 | 173 | ||
174 | led_classdev_unregister(&led->led_dev); | 174 | led_classdev_unregister(&led->led_dev); |
175 | flush_work_sync(&led->work); | 175 | flush_work(&led->work); |
176 | 176 | ||
177 | return 0; | 177 | return 0; |
178 | } | 178 | } |
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c index 918d4baff1c7..4c62113f7a77 100644 --- a/drivers/leds/leds-wm8350.c +++ b/drivers/leds/leds-wm8350.c | |||
@@ -275,7 +275,7 @@ static int wm8350_led_remove(struct platform_device *pdev) | |||
275 | struct wm8350_led *led = platform_get_drvdata(pdev); | 275 | struct wm8350_led *led = platform_get_drvdata(pdev); |
276 | 276 | ||
277 | led_classdev_unregister(&led->cdev); | 277 | led_classdev_unregister(&led->cdev); |
278 | flush_work_sync(&led->work); | 278 | flush_work(&led->work); |
279 | wm8350_led_disable(led); | 279 | wm8350_led_disable(led); |
280 | regulator_put(led->dcdc); | 280 | regulator_put(led->dcdc); |
281 | regulator_put(led->isink); | 281 | regulator_put(led->isink); |
diff --git a/drivers/macintosh/ams/ams-core.c b/drivers/macintosh/ams/ams-core.c index 5c6a2d876562..36a4fdddd64a 100644 --- a/drivers/macintosh/ams/ams-core.c +++ b/drivers/macintosh/ams/ams-core.c | |||
@@ -226,7 +226,7 @@ void ams_sensor_detach(void) | |||
226 | * We do this after ams_info.exit(), because an interrupt might | 226 | * We do this after ams_info.exit(), because an interrupt might |
227 | * have arrived before disabling them. | 227 | * have arrived before disabling them. |
228 | */ | 228 | */ |
229 | flush_work_sync(&ams_info.worker); | 229 | flush_work(&ams_info.worker); |
230 | 230 | ||
231 | /* Remove device */ | 231 | /* Remove device */ |
232 | of_device_unregister(ams_info.of_dev); | 232 | of_device_unregister(ams_info.of_dev); |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 034233eefc82..d778563a4ffd 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -944,7 +944,7 @@ static void flush_multipath_work(struct multipath *m) | |||
944 | flush_workqueue(kmpath_handlerd); | 944 | flush_workqueue(kmpath_handlerd); |
945 | multipath_wait_for_pg_init_completion(m); | 945 | multipath_wait_for_pg_init_completion(m); |
946 | flush_workqueue(kmultipathd); | 946 | flush_workqueue(kmultipathd); |
947 | flush_work_sync(&m->trigger_event); | 947 | flush_work(&m->trigger_event); |
948 | } | 948 | } |
949 | 949 | ||
950 | static void multipath_dtr(struct dm_target *ti) | 950 | static void multipath_dtr(struct dm_target *ti) |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index bc5ddba8045b..fd61f98ee1f6 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -1146,7 +1146,7 @@ static void mirror_dtr(struct dm_target *ti) | |||
1146 | 1146 | ||
1147 | del_timer_sync(&ms->timer); | 1147 | del_timer_sync(&ms->timer); |
1148 | flush_workqueue(ms->kmirrord_wq); | 1148 | flush_workqueue(ms->kmirrord_wq); |
1149 | flush_work_sync(&ms->trigger_event); | 1149 | flush_work(&ms->trigger_event); |
1150 | dm_kcopyd_client_destroy(ms->kcopyd_client); | 1150 | dm_kcopyd_client_destroy(ms->kcopyd_client); |
1151 | destroy_workqueue(ms->kmirrord_wq); | 1151 | destroy_workqueue(ms->kmirrord_wq); |
1152 | free_context(ms, ti, ms->nr_mirrors); | 1152 | free_context(ms, ti, ms->nr_mirrors); |
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index a087bf2a8d66..e2f876539743 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -199,7 +199,7 @@ static void stripe_dtr(struct dm_target *ti) | |||
199 | for (i = 0; i < sc->stripes; i++) | 199 | for (i = 0; i < sc->stripes; i++) |
200 | dm_put_device(ti, sc->stripe[i].dev); | 200 | dm_put_device(ti, sc->stripe[i].dev); |
201 | 201 | ||
202 | flush_work_sync(&sc->trigger_event); | 202 | flush_work(&sc->trigger_event); |
203 | kfree(sc); | 203 | kfree(sc); |
204 | } | 204 | } |
205 | 205 | ||
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index 8766ce8c354d..c2117688aa23 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c | |||
@@ -1329,8 +1329,8 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num) | |||
1329 | return -EBUSY; | 1329 | return -EBUSY; |
1330 | 1330 | ||
1331 | dvb_net_stop(net); | 1331 | dvb_net_stop(net); |
1332 | flush_work_sync(&priv->set_multicast_list_wq); | 1332 | flush_work(&priv->set_multicast_list_wq); |
1333 | flush_work_sync(&priv->restart_net_feed_wq); | 1333 | flush_work(&priv->restart_net_feed_wq); |
1334 | printk("dvb_net: removed network interface %s\n", net->name); | 1334 | printk("dvb_net: removed network interface %s\n", net->name); |
1335 | unregister_netdev(net); | 1335 | unregister_netdev(net); |
1336 | dvbnet->state[num]=0; | 1336 | dvbnet->state[num]=0; |
diff --git a/drivers/media/dvb/mantis/mantis_evm.c b/drivers/media/dvb/mantis/mantis_evm.c index 71ce52875c38..909ff54868a3 100644 --- a/drivers/media/dvb/mantis/mantis_evm.c +++ b/drivers/media/dvb/mantis/mantis_evm.c | |||
@@ -111,7 +111,7 @@ void mantis_evmgr_exit(struct mantis_ca *ca) | |||
111 | struct mantis_pci *mantis = ca->ca_priv; | 111 | struct mantis_pci *mantis = ca->ca_priv; |
112 | 112 | ||
113 | dprintk(MANTIS_DEBUG, 1, "Mantis Host I/F Event manager exiting"); | 113 | dprintk(MANTIS_DEBUG, 1, "Mantis Host I/F Event manager exiting"); |
114 | flush_work_sync(&ca->hif_evm_work); | 114 | flush_work(&ca->hif_evm_work); |
115 | mantis_hif_exit(ca); | 115 | mantis_hif_exit(ca); |
116 | mantis_pcmcia_exit(ca); | 116 | mantis_pcmcia_exit(ca); |
117 | } | 117 | } |
diff --git a/drivers/media/dvb/mantis/mantis_uart.c b/drivers/media/dvb/mantis/mantis_uart.c index 18340dafa426..85e977861b4a 100644 --- a/drivers/media/dvb/mantis/mantis_uart.c +++ b/drivers/media/dvb/mantis/mantis_uart.c | |||
@@ -183,6 +183,6 @@ void mantis_uart_exit(struct mantis_pci *mantis) | |||
183 | { | 183 | { |
184 | /* disable interrupt */ | 184 | /* disable interrupt */ |
185 | mmwrite(mmread(MANTIS_UART_CTL) & 0xffef, MANTIS_UART_CTL); | 185 | mmwrite(mmread(MANTIS_UART_CTL) & 0xffef, MANTIS_UART_CTL); |
186 | flush_work_sync(&mantis->uart_work); | 186 | flush_work(&mantis->uart_work); |
187 | } | 187 | } |
188 | EXPORT_SYMBOL_GPL(mantis_uart_exit); | 188 | EXPORT_SYMBOL_GPL(mantis_uart_exit); |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index b58ff87db771..2ce7179a3864 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -196,7 +196,7 @@ static void request_modules(struct bttv *dev) | |||
196 | 196 | ||
197 | static void flush_request_modules(struct bttv *dev) | 197 | static void flush_request_modules(struct bttv *dev) |
198 | { | 198 | { |
199 | flush_work_sync(&dev->request_module_wk); | 199 | flush_work(&dev->request_module_wk); |
200 | } | 200 | } |
201 | #else | 201 | #else |
202 | #define request_modules(dev) | 202 | #define request_modules(dev) |
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 7e5ffd6f5178..75c890907920 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -272,7 +272,7 @@ static void request_modules(struct cx18 *dev) | |||
272 | 272 | ||
273 | static void flush_request_modules(struct cx18 *dev) | 273 | static void flush_request_modules(struct cx18 *dev) |
274 | { | 274 | { |
275 | flush_work_sync(&dev->request_module_wk); | 275 | flush_work(&dev->request_module_wk); |
276 | } | 276 | } |
277 | #else | 277 | #else |
278 | #define request_modules(dev) | 278 | #define request_modules(dev) |
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 02d4d36735d3..b84ebc54d91b 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -1002,7 +1002,7 @@ static void request_modules(struct cx231xx *dev) | |||
1002 | 1002 | ||
1003 | static void flush_request_modules(struct cx231xx *dev) | 1003 | static void flush_request_modules(struct cx231xx *dev) |
1004 | { | 1004 | { |
1005 | flush_work_sync(&dev->request_module_wk); | 1005 | flush_work(&dev->request_module_wk); |
1006 | } | 1006 | } |
1007 | #else | 1007 | #else |
1008 | #define request_modules(dev) | 1008 | #define request_modules(dev) |
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index ce765e3f77bd..bcbf7faf1bab 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c | |||
@@ -231,9 +231,9 @@ static void cx23885_input_ir_stop(struct cx23885_dev *dev) | |||
231 | v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, ¶ms); | 231 | v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, ¶ms); |
232 | v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, ¶ms); | 232 | v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, ¶ms); |
233 | } | 233 | } |
234 | flush_work_sync(&dev->cx25840_work); | 234 | flush_work(&dev->cx25840_work); |
235 | flush_work_sync(&dev->ir_rx_work); | 235 | flush_work(&dev->ir_rx_work); |
236 | flush_work_sync(&dev->ir_tx_work); | 236 | flush_work(&dev->ir_tx_work); |
237 | } | 237 | } |
238 | 238 | ||
239 | static void cx23885_input_ir_close(struct rc_dev *rc) | 239 | static void cx23885_input_ir_close(struct rc_dev *rc) |
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index cd5386ee210c..c04fb618e10b 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -70,7 +70,7 @@ static void request_modules(struct cx8802_dev *dev) | |||
70 | 70 | ||
71 | static void flush_request_modules(struct cx8802_dev *dev) | 71 | static void flush_request_modules(struct cx8802_dev *dev) |
72 | { | 72 | { |
73 | flush_work_sync(&dev->request_module_wk); | 73 | flush_work(&dev->request_module_wk); |
74 | } | 74 | } |
75 | #else | 75 | #else |
76 | #define request_modules(dev) | 76 | #define request_modules(dev) |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index ca62b9981380..f7831e73f077 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -2900,7 +2900,7 @@ static void request_modules(struct em28xx *dev) | |||
2900 | 2900 | ||
2901 | static void flush_request_modules(struct em28xx *dev) | 2901 | static void flush_request_modules(struct em28xx *dev) |
2902 | { | 2902 | { |
2903 | flush_work_sync(&dev->request_module_wk); | 2903 | flush_work(&dev->request_module_wk); |
2904 | } | 2904 | } |
2905 | #else | 2905 | #else |
2906 | #define request_modules(dev) | 2906 | #define request_modules(dev) |
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index e5015b0d5508..8d7283bbd431 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c | |||
@@ -1198,7 +1198,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) | |||
1198 | 1198 | ||
1199 | atomic_inc(&cam->reset_disable); | 1199 | atomic_inc(&cam->reset_disable); |
1200 | 1200 | ||
1201 | flush_work_sync(&cam->sensor_reset_work); | 1201 | flush_work(&cam->sensor_reset_work); |
1202 | 1202 | ||
1203 | rval = videobuf_streamoff(q); | 1203 | rval = videobuf_streamoff(q); |
1204 | if (!rval) { | 1204 | if (!rval) { |
@@ -1512,7 +1512,7 @@ static int omap24xxcam_release(struct file *file) | |||
1512 | 1512 | ||
1513 | atomic_inc(&cam->reset_disable); | 1513 | atomic_inc(&cam->reset_disable); |
1514 | 1514 | ||
1515 | flush_work_sync(&cam->sensor_reset_work); | 1515 | flush_work(&cam->sensor_reset_work); |
1516 | 1516 | ||
1517 | /* stop streaming capture */ | 1517 | /* stop streaming capture */ |
1518 | videobuf_streamoff(&fh->vbq); | 1518 | videobuf_streamoff(&fh->vbq); |
@@ -1536,7 +1536,7 @@ static int omap24xxcam_release(struct file *file) | |||
1536 | * not be scheduled anymore since streaming is already | 1536 | * not be scheduled anymore since streaming is already |
1537 | * disabled.) | 1537 | * disabled.) |
1538 | */ | 1538 | */ |
1539 | flush_work_sync(&cam->sensor_reset_work); | 1539 | flush_work(&cam->sensor_reset_work); |
1540 | 1540 | ||
1541 | mutex_lock(&cam->mutex); | 1541 | mutex_lock(&cam->mutex); |
1542 | if (atomic_dec_return(&cam->users) == 0) { | 1542 | if (atomic_dec_return(&cam->users) == 0) { |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 5fbb4e49495c..f2b37e05b964 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -170,7 +170,7 @@ static void request_submodules(struct saa7134_dev *dev) | |||
170 | 170 | ||
171 | static void flush_request_submodules(struct saa7134_dev *dev) | 171 | static void flush_request_submodules(struct saa7134_dev *dev) |
172 | { | 172 | { |
173 | flush_work_sync(&dev->request_module_wk); | 173 | flush_work(&dev->request_module_wk); |
174 | } | 174 | } |
175 | 175 | ||
176 | #else | 176 | #else |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index dde361a9194e..4df79c656909 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -556,7 +556,7 @@ static int empress_fini(struct saa7134_dev *dev) | |||
556 | 556 | ||
557 | if (NULL == dev->empress_dev) | 557 | if (NULL == dev->empress_dev) |
558 | return 0; | 558 | return 0; |
559 | flush_work_sync(&dev->empress_workqueue); | 559 | flush_work(&dev->empress_workqueue); |
560 | video_unregister_device(dev->empress_dev); | 560 | video_unregister_device(dev->empress_dev); |
561 | dev->empress_dev = NULL; | 561 | dev->empress_dev = NULL; |
562 | return 0; | 562 | return 0; |
diff --git a/drivers/media/video/tm6000/tm6000-cards.c b/drivers/media/video/tm6000/tm6000-cards.c index 034659b13174..307d8c5fb7cd 100644 --- a/drivers/media/video/tm6000/tm6000-cards.c +++ b/drivers/media/video/tm6000/tm6000-cards.c | |||
@@ -1074,7 +1074,7 @@ static void request_modules(struct tm6000_core *dev) | |||
1074 | 1074 | ||
1075 | static void flush_request_modules(struct tm6000_core *dev) | 1075 | static void flush_request_modules(struct tm6000_core *dev) |
1076 | { | 1076 | { |
1077 | flush_work_sync(&dev->request_module_wk); | 1077 | flush_work(&dev->request_module_wk); |
1078 | } | 1078 | } |
1079 | #else | 1079 | #else |
1080 | #define request_modules(dev) | 1080 | #define request_modules(dev) |
diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index cb4910ac4d12..55d589981412 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c | |||
@@ -1259,7 +1259,7 @@ static int menelaus_probe(struct i2c_client *client, | |||
1259 | return 0; | 1259 | return 0; |
1260 | fail2: | 1260 | fail2: |
1261 | free_irq(client->irq, menelaus); | 1261 | free_irq(client->irq, menelaus); |
1262 | flush_work_sync(&menelaus->work); | 1262 | flush_work(&menelaus->work); |
1263 | fail1: | 1263 | fail1: |
1264 | kfree(menelaus); | 1264 | kfree(menelaus); |
1265 | return err; | 1265 | return err; |
@@ -1270,7 +1270,7 @@ static int __exit menelaus_remove(struct i2c_client *client) | |||
1270 | struct menelaus_chip *menelaus = i2c_get_clientdata(client); | 1270 | struct menelaus_chip *menelaus = i2c_get_clientdata(client); |
1271 | 1271 | ||
1272 | free_irq(client->irq, menelaus); | 1272 | free_irq(client->irq, menelaus); |
1273 | flush_work_sync(&menelaus->work); | 1273 | flush_work(&menelaus->work); |
1274 | kfree(menelaus); | 1274 | kfree(menelaus); |
1275 | the_menelaus = NULL; | 1275 | the_menelaus = NULL; |
1276 | return 0; | 1276 | return 0; |
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index df03dd3bd0e2..6a7710603a90 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c | |||
@@ -487,7 +487,7 @@ static void __exit | |||
487 | ioc4_exit(void) | 487 | ioc4_exit(void) |
488 | { | 488 | { |
489 | /* Ensure ioc4_load_modules() has completed before exiting */ | 489 | /* Ensure ioc4_load_modules() has completed before exiting */ |
490 | flush_work_sync(&ioc4_load_modules_work); | 490 | flush_work(&ioc4_load_modules_work); |
491 | pci_unregister_driver(&ioc4_driver); | 491 | pci_unregister_driver(&ioc4_driver); |
492 | } | 492 | } |
493 | 493 | ||
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 597f189b4427..ee2e16b17017 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -204,8 +204,8 @@ void mmc_host_clk_release(struct mmc_host *host) | |||
204 | host->clk_requests--; | 204 | host->clk_requests--; |
205 | if (mmc_host_may_gate_card(host->card) && | 205 | if (mmc_host_may_gate_card(host->card) && |
206 | !host->clk_requests) | 206 | !host->clk_requests) |
207 | queue_delayed_work(system_nrt_wq, &host->clk_gate_work, | 207 | schedule_delayed_work(&host->clk_gate_work, |
208 | msecs_to_jiffies(host->clkgate_delay)); | 208 | msecs_to_jiffies(host->clkgate_delay)); |
209 | spin_unlock_irqrestore(&host->clk_lock, flags); | 209 | spin_unlock_irqrestore(&host->clk_lock, flags); |
210 | } | 210 | } |
211 | 211 | ||
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c index 551e316e4454..438737a1f59a 100644 --- a/drivers/mtd/mtdoops.c +++ b/drivers/mtd/mtdoops.c | |||
@@ -387,8 +387,8 @@ static void mtdoops_notify_remove(struct mtd_info *mtd) | |||
387 | printk(KERN_WARNING "mtdoops: could not unregister kmsg_dumper\n"); | 387 | printk(KERN_WARNING "mtdoops: could not unregister kmsg_dumper\n"); |
388 | 388 | ||
389 | cxt->mtd = NULL; | 389 | cxt->mtd = NULL; |
390 | flush_work_sync(&cxt->work_erase); | 390 | flush_work(&cxt->work_erase); |
391 | flush_work_sync(&cxt->work_write); | 391 | flush_work(&cxt->work_write); |
392 | } | 392 | } |
393 | 393 | ||
394 | 394 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c index 875bbb999aa2..9c9f3260344a 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | |||
@@ -1394,7 +1394,7 @@ static int offload_close(struct t3cdev *tdev) | |||
1394 | sysfs_remove_group(&tdev->lldev->dev.kobj, &offload_attr_group); | 1394 | sysfs_remove_group(&tdev->lldev->dev.kobj, &offload_attr_group); |
1395 | 1395 | ||
1396 | /* Flush work scheduled while releasing TIDs */ | 1396 | /* Flush work scheduled while releasing TIDs */ |
1397 | flush_work_sync(&td->tid_release_task); | 1397 | flush_work(&td->tid_release_task); |
1398 | 1398 | ||
1399 | tdev->lldev = NULL; | 1399 | tdev->lldev = NULL; |
1400 | cxgb3_set_dummy_ops(tdev); | 1400 | cxgb3_set_dummy_ops(tdev); |
diff --git a/drivers/net/ethernet/mellanox/mlx4/sense.c b/drivers/net/ethernet/mellanox/mlx4/sense.c index 34ee09bae36e..094773d88f80 100644 --- a/drivers/net/ethernet/mellanox/mlx4/sense.c +++ b/drivers/net/ethernet/mellanox/mlx4/sense.c | |||
@@ -139,5 +139,5 @@ void mlx4_sense_init(struct mlx4_dev *dev) | |||
139 | for (port = 1; port <= dev->caps.num_ports; port++) | 139 | for (port = 1; port <= dev->caps.num_ports; port++) |
140 | sense->do_sense_port[port] = 1; | 140 | sense->do_sense_port[port] = 1; |
141 | 141 | ||
142 | INIT_DELAYED_WORK_DEFERRABLE(&sense->sense_poll, mlx4_sense_port); | 142 | INIT_DEFERRABLE_WORK(&sense->sense_poll, mlx4_sense_port); |
143 | } | 143 | } |
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c index cfa71a30dc8d..3e5b7509502c 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c | |||
@@ -3521,7 +3521,7 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev) | |||
3521 | 3521 | ||
3522 | strncpy(buf, dev->name, IFNAMSIZ); | 3522 | strncpy(buf, dev->name, IFNAMSIZ); |
3523 | 3523 | ||
3524 | flush_work_sync(&vdev->reset_task); | 3524 | flush_work(&vdev->reset_task); |
3525 | 3525 | ||
3526 | /* in 2.6 will call stop() if device is up */ | 3526 | /* in 2.6 will call stop() if device is up */ |
3527 | unregister_netdev(dev); | 3527 | unregister_netdev(dev); |
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index ce4df61b4b56..c8251be104d6 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c | |||
@@ -3890,7 +3890,7 @@ static int cas_change_mtu(struct net_device *dev, int new_mtu) | |||
3890 | schedule_work(&cp->reset_task); | 3890 | schedule_work(&cp->reset_task); |
3891 | #endif | 3891 | #endif |
3892 | 3892 | ||
3893 | flush_work_sync(&cp->reset_task); | 3893 | flush_work(&cp->reset_task); |
3894 | return 0; | 3894 | return 0; |
3895 | } | 3895 | } |
3896 | 3896 | ||
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 3208dca66758..8419bf385e08 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -9927,7 +9927,7 @@ static int niu_suspend(struct pci_dev *pdev, pm_message_t state) | |||
9927 | if (!netif_running(dev)) | 9927 | if (!netif_running(dev)) |
9928 | return 0; | 9928 | return 0; |
9929 | 9929 | ||
9930 | flush_work_sync(&np->reset_task); | 9930 | flush_work(&np->reset_task); |
9931 | niu_netif_stop(np); | 9931 | niu_netif_stop(np); |
9932 | 9932 | ||
9933 | del_timer_sync(&np->timer); | 9933 | del_timer_sync(&np->timer); |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 83d2b0c34c5e..9650c413e11f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -521,7 +521,7 @@ static void refill_work(struct work_struct *work) | |||
521 | /* In theory, this can happen: if we don't get any buffers in | 521 | /* In theory, this can happen: if we don't get any buffers in |
522 | * we will *never* try to fill again. */ | 522 | * we will *never* try to fill again. */ |
523 | if (still_empty) | 523 | if (still_empty) |
524 | queue_delayed_work(system_nrt_wq, &vi->refill, HZ/2); | 524 | schedule_delayed_work(&vi->refill, HZ/2); |
525 | } | 525 | } |
526 | 526 | ||
527 | static int virtnet_poll(struct napi_struct *napi, int budget) | 527 | static int virtnet_poll(struct napi_struct *napi, int budget) |
@@ -540,7 +540,7 @@ again: | |||
540 | 540 | ||
541 | if (vi->num < vi->max / 2) { | 541 | if (vi->num < vi->max / 2) { |
542 | if (!try_fill_recv(vi, GFP_ATOMIC)) | 542 | if (!try_fill_recv(vi, GFP_ATOMIC)) |
543 | queue_delayed_work(system_nrt_wq, &vi->refill, 0); | 543 | schedule_delayed_work(&vi->refill, 0); |
544 | } | 544 | } |
545 | 545 | ||
546 | /* Out of packets? */ | 546 | /* Out of packets? */ |
@@ -745,7 +745,7 @@ static int virtnet_open(struct net_device *dev) | |||
745 | 745 | ||
746 | /* Make sure we have some buffers: if oom use wq. */ | 746 | /* Make sure we have some buffers: if oom use wq. */ |
747 | if (!try_fill_recv(vi, GFP_KERNEL)) | 747 | if (!try_fill_recv(vi, GFP_KERNEL)) |
748 | queue_delayed_work(system_nrt_wq, &vi->refill, 0); | 748 | schedule_delayed_work(&vi->refill, 0); |
749 | 749 | ||
750 | virtnet_napi_enable(vi); | 750 | virtnet_napi_enable(vi); |
751 | return 0; | 751 | return 0; |
@@ -1020,7 +1020,7 @@ static void virtnet_config_changed(struct virtio_device *vdev) | |||
1020 | { | 1020 | { |
1021 | struct virtnet_info *vi = vdev->priv; | 1021 | struct virtnet_info *vi = vdev->priv; |
1022 | 1022 | ||
1023 | queue_work(system_nrt_wq, &vi->config_work); | 1023 | schedule_work(&vi->config_work); |
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | static int init_vqs(struct virtnet_info *vi) | 1026 | static int init_vqs(struct virtnet_info *vi) |
@@ -1152,7 +1152,7 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
1152 | otherwise get link status from config. */ | 1152 | otherwise get link status from config. */ |
1153 | if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) { | 1153 | if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) { |
1154 | netif_carrier_off(dev); | 1154 | netif_carrier_off(dev); |
1155 | queue_work(system_nrt_wq, &vi->config_work); | 1155 | schedule_work(&vi->config_work); |
1156 | } else { | 1156 | } else { |
1157 | vi->status = VIRTIO_NET_S_LINK_UP; | 1157 | vi->status = VIRTIO_NET_S_LINK_UP; |
1158 | netif_carrier_on(dev); | 1158 | netif_carrier_on(dev); |
@@ -1264,7 +1264,7 @@ static int virtnet_restore(struct virtio_device *vdev) | |||
1264 | netif_device_attach(vi->dev); | 1264 | netif_device_attach(vi->dev); |
1265 | 1265 | ||
1266 | if (!try_fill_recv(vi, GFP_KERNEL)) | 1266 | if (!try_fill_recv(vi, GFP_KERNEL)) |
1267 | queue_delayed_work(system_nrt_wq, &vi->refill, 0); | 1267 | schedule_delayed_work(&vi->refill, 0); |
1268 | 1268 | ||
1269 | mutex_lock(&vi->config_lock); | 1269 | mutex_lock(&vi->config_lock); |
1270 | vi->config_enable = true; | 1270 | vi->config_enable = true; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index e1f410277242..c6ea995750db 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -860,10 +860,10 @@ void hostap_free_data(struct ap_data *ap) | |||
860 | return; | 860 | return; |
861 | } | 861 | } |
862 | 862 | ||
863 | flush_work_sync(&ap->add_sta_proc_queue); | 863 | flush_work(&ap->add_sta_proc_queue); |
864 | 864 | ||
865 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | 865 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT |
866 | flush_work_sync(&ap->wds_oper_queue); | 866 | flush_work(&ap->wds_oper_queue); |
867 | if (ap->crypt) | 867 | if (ap->crypt) |
868 | ap->crypt->deinit(ap->crypt_priv); | 868 | ap->crypt->deinit(ap->crypt_priv); |
869 | ap->crypt = ap->crypt_priv = NULL; | 869 | ap->crypt = ap->crypt_priv = NULL; |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 50f87b60b0bd..8e7000fd4414 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -3311,13 +3311,13 @@ static void prism2_free_local_data(struct net_device *dev) | |||
3311 | 3311 | ||
3312 | unregister_netdev(local->dev); | 3312 | unregister_netdev(local->dev); |
3313 | 3313 | ||
3314 | flush_work_sync(&local->reset_queue); | 3314 | flush_work(&local->reset_queue); |
3315 | flush_work_sync(&local->set_multicast_list_queue); | 3315 | flush_work(&local->set_multicast_list_queue); |
3316 | flush_work_sync(&local->set_tim_queue); | 3316 | flush_work(&local->set_tim_queue); |
3317 | #ifndef PRISM2_NO_STATION_MODES | 3317 | #ifndef PRISM2_NO_STATION_MODES |
3318 | flush_work_sync(&local->info_queue); | 3318 | flush_work(&local->info_queue); |
3319 | #endif | 3319 | #endif |
3320 | flush_work_sync(&local->comms_qual_update); | 3320 | flush_work(&local->comms_qual_update); |
3321 | 3321 | ||
3322 | lib80211_crypt_info_free(&local->crypt_info); | 3322 | lib80211_crypt_info_free(&local->crypt_info); |
3323 | 3323 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 83324b321652..534e6557e7e6 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -2181,8 +2181,7 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) | |||
2181 | 2181 | ||
2182 | /* Make sure the RF Kill check timer is running */ | 2182 | /* Make sure the RF Kill check timer is running */ |
2183 | priv->stop_rf_kill = 0; | 2183 | priv->stop_rf_kill = 0; |
2184 | cancel_delayed_work(&priv->rf_kill); | 2184 | mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ)); |
2185 | schedule_delayed_work(&priv->rf_kill, round_jiffies_relative(HZ)); | ||
2186 | } | 2185 | } |
2187 | 2186 | ||
2188 | static void send_scan_event(void *data) | 2187 | static void send_scan_event(void *data) |
@@ -4322,9 +4321,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio) | |||
4322 | "disabled by HW switch\n"); | 4321 | "disabled by HW switch\n"); |
4323 | /* Make sure the RF_KILL check timer is running */ | 4322 | /* Make sure the RF_KILL check timer is running */ |
4324 | priv->stop_rf_kill = 0; | 4323 | priv->stop_rf_kill = 0; |
4325 | cancel_delayed_work(&priv->rf_kill); | 4324 | mod_delayed_work(system_wq, &priv->rf_kill, |
4326 | schedule_delayed_work(&priv->rf_kill, | 4325 | round_jiffies_relative(HZ)); |
4327 | round_jiffies_relative(HZ)); | ||
4328 | } else | 4326 | } else |
4329 | schedule_reset(priv); | 4327 | schedule_reset(priv); |
4330 | } | 4328 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index af83c43bcdb1..ef2b171e3514 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -1164,8 +1164,7 @@ void zd_usb_reset_rx_idle_timer(struct zd_usb *usb) | |||
1164 | { | 1164 | { |
1165 | struct zd_usb_rx *rx = &usb->rx; | 1165 | struct zd_usb_rx *rx = &usb->rx; |
1166 | 1166 | ||
1167 | cancel_delayed_work(&rx->idle_work); | 1167 | mod_delayed_work(zd_workqueue, &rx->idle_work, ZD_RX_IDLE_INTERVAL); |
1168 | queue_delayed_work(zd_workqueue, &rx->idle_work, ZD_RX_IDLE_INTERVAL); | ||
1169 | } | 1168 | } |
1170 | 1169 | ||
1171 | static inline void init_usb_interrupt(struct zd_usb *usb) | 1170 | static inline void init_usb_interrupt(struct zd_usb *usb) |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 52daaa816e53..9da5fe715e6a 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -7685,25 +7685,15 @@ static int fan_set_speed(int speed) | |||
7685 | 7685 | ||
7686 | static void fan_watchdog_reset(void) | 7686 | static void fan_watchdog_reset(void) |
7687 | { | 7687 | { |
7688 | static int fan_watchdog_active; | ||
7689 | |||
7690 | if (fan_control_access_mode == TPACPI_FAN_WR_NONE) | 7688 | if (fan_control_access_mode == TPACPI_FAN_WR_NONE) |
7691 | return; | 7689 | return; |
7692 | 7690 | ||
7693 | if (fan_watchdog_active) | ||
7694 | cancel_delayed_work(&fan_watchdog_task); | ||
7695 | |||
7696 | if (fan_watchdog_maxinterval > 0 && | 7691 | if (fan_watchdog_maxinterval > 0 && |
7697 | tpacpi_lifecycle != TPACPI_LIFE_EXITING) { | 7692 | tpacpi_lifecycle != TPACPI_LIFE_EXITING) |
7698 | fan_watchdog_active = 1; | 7693 | mod_delayed_work(tpacpi_wq, &fan_watchdog_task, |
7699 | if (!queue_delayed_work(tpacpi_wq, &fan_watchdog_task, | 7694 | msecs_to_jiffies(fan_watchdog_maxinterval * 1000)); |
7700 | msecs_to_jiffies(fan_watchdog_maxinterval | 7695 | else |
7701 | * 1000))) { | 7696 | cancel_delayed_work(&fan_watchdog_task); |
7702 | pr_err("failed to queue the fan watchdog, " | ||
7703 | "watchdog will not trigger\n"); | ||
7704 | } | ||
7705 | } else | ||
7706 | fan_watchdog_active = 0; | ||
7707 | } | 7697 | } |
7708 | 7698 | ||
7709 | static void fan_watchdog_fire(struct work_struct *ignored) | 7699 | static void fan_watchdog_fire(struct work_struct *ignored) |
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c index bba3ccac72fe..3041514f4d3f 100644 --- a/drivers/power/ab8500_btemp.c +++ b/drivers/power/ab8500_btemp.c | |||
@@ -1018,7 +1018,7 @@ static int __devinit ab8500_btemp_probe(struct platform_device *pdev) | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | /* Init work for measuring temperature periodically */ | 1020 | /* Init work for measuring temperature periodically */ |
1021 | INIT_DELAYED_WORK_DEFERRABLE(&di->btemp_periodic_work, | 1021 | INIT_DEFERRABLE_WORK(&di->btemp_periodic_work, |
1022 | ab8500_btemp_periodic_work); | 1022 | ab8500_btemp_periodic_work); |
1023 | 1023 | ||
1024 | /* Identify the battery */ | 1024 | /* Identify the battery */ |
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c index d4f0c98428cb..0701dbc2b7e1 100644 --- a/drivers/power/ab8500_charger.c +++ b/drivers/power/ab8500_charger.c | |||
@@ -2618,9 +2618,9 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev) | |||
2618 | } | 2618 | } |
2619 | 2619 | ||
2620 | /* Init work for HW failure check */ | 2620 | /* Init work for HW failure check */ |
2621 | INIT_DELAYED_WORK_DEFERRABLE(&di->check_hw_failure_work, | 2621 | INIT_DEFERRABLE_WORK(&di->check_hw_failure_work, |
2622 | ab8500_charger_check_hw_failure_work); | 2622 | ab8500_charger_check_hw_failure_work); |
2623 | INIT_DELAYED_WORK_DEFERRABLE(&di->check_usbchgnotok_work, | 2623 | INIT_DEFERRABLE_WORK(&di->check_usbchgnotok_work, |
2624 | ab8500_charger_check_usbchargernotok_work); | 2624 | ab8500_charger_check_usbchargernotok_work); |
2625 | 2625 | ||
2626 | /* | 2626 | /* |
@@ -2632,10 +2632,10 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev) | |||
2632 | * watchdog have to be kicked by the charger driver | 2632 | * watchdog have to be kicked by the charger driver |
2633 | * when the AC charger is disabled | 2633 | * when the AC charger is disabled |
2634 | */ | 2634 | */ |
2635 | INIT_DELAYED_WORK_DEFERRABLE(&di->kick_wd_work, | 2635 | INIT_DEFERRABLE_WORK(&di->kick_wd_work, |
2636 | ab8500_charger_kick_watchdog_work); | 2636 | ab8500_charger_kick_watchdog_work); |
2637 | 2637 | ||
2638 | INIT_DELAYED_WORK_DEFERRABLE(&di->check_vbat_work, | 2638 | INIT_DEFERRABLE_WORK(&di->check_vbat_work, |
2639 | ab8500_charger_check_vbat_work); | 2639 | ab8500_charger_check_vbat_work); |
2640 | 2640 | ||
2641 | /* Init work for charger detection */ | 2641 | /* Init work for charger detection */ |
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index bf022255994c..5c9e7c263c38 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c | |||
@@ -2516,19 +2516,19 @@ static int __devinit ab8500_fg_probe(struct platform_device *pdev) | |||
2516 | INIT_WORK(&di->fg_acc_cur_work, ab8500_fg_acc_cur_work); | 2516 | INIT_WORK(&di->fg_acc_cur_work, ab8500_fg_acc_cur_work); |
2517 | 2517 | ||
2518 | /* Init work for reinitialising the fg algorithm */ | 2518 | /* Init work for reinitialising the fg algorithm */ |
2519 | INIT_DELAYED_WORK_DEFERRABLE(&di->fg_reinit_work, | 2519 | INIT_DEFERRABLE_WORK(&di->fg_reinit_work, |
2520 | ab8500_fg_reinit_work); | 2520 | ab8500_fg_reinit_work); |
2521 | 2521 | ||
2522 | /* Work delayed Queue to run the state machine */ | 2522 | /* Work delayed Queue to run the state machine */ |
2523 | INIT_DELAYED_WORK_DEFERRABLE(&di->fg_periodic_work, | 2523 | INIT_DEFERRABLE_WORK(&di->fg_periodic_work, |
2524 | ab8500_fg_periodic_work); | 2524 | ab8500_fg_periodic_work); |
2525 | 2525 | ||
2526 | /* Work to check low battery condition */ | 2526 | /* Work to check low battery condition */ |
2527 | INIT_DELAYED_WORK_DEFERRABLE(&di->fg_low_bat_work, | 2527 | INIT_DEFERRABLE_WORK(&di->fg_low_bat_work, |
2528 | ab8500_fg_low_bat_work); | 2528 | ab8500_fg_low_bat_work); |
2529 | 2529 | ||
2530 | /* Init work for HW failure check */ | 2530 | /* Init work for HW failure check */ |
2531 | INIT_DELAYED_WORK_DEFERRABLE(&di->fg_check_hw_failure_work, | 2531 | INIT_DEFERRABLE_WORK(&di->fg_check_hw_failure_work, |
2532 | ab8500_fg_check_hw_failure_work); | 2532 | ab8500_fg_check_hw_failure_work); |
2533 | 2533 | ||
2534 | /* Initialize OVV, and other registers */ | 2534 | /* Initialize OVV, and other registers */ |
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 804b88c760d6..4d302803ffcc 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c | |||
@@ -1848,9 +1848,9 @@ static int __devinit abx500_chargalg_probe(struct platform_device *pdev) | |||
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | /* Init work for chargalg */ | 1850 | /* Init work for chargalg */ |
1851 | INIT_DELAYED_WORK_DEFERRABLE(&di->chargalg_periodic_work, | 1851 | INIT_DEFERRABLE_WORK(&di->chargalg_periodic_work, |
1852 | abx500_chargalg_periodic_work); | 1852 | abx500_chargalg_periodic_work); |
1853 | INIT_DELAYED_WORK_DEFERRABLE(&di->chargalg_wd_work, | 1853 | INIT_DEFERRABLE_WORK(&di->chargalg_wd_work, |
1854 | abx500_chargalg_wd_work); | 1854 | abx500_chargalg_wd_work); |
1855 | 1855 | ||
1856 | /* Init work for chargalg */ | 1856 | /* Init work for chargalg */ |
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c index 526e5c931294..7ff83cf43c8c 100644 --- a/drivers/power/charger-manager.c +++ b/drivers/power/charger-manager.c | |||
@@ -509,9 +509,8 @@ static void _setup_polling(struct work_struct *work) | |||
509 | if (!delayed_work_pending(&cm_monitor_work) || | 509 | if (!delayed_work_pending(&cm_monitor_work) || |
510 | (delayed_work_pending(&cm_monitor_work) && | 510 | (delayed_work_pending(&cm_monitor_work) && |
511 | time_after(next_polling, _next_polling))) { | 511 | time_after(next_polling, _next_polling))) { |
512 | cancel_delayed_work_sync(&cm_monitor_work); | ||
513 | next_polling = jiffies + polling_jiffy; | 512 | next_polling = jiffies + polling_jiffy; |
514 | queue_delayed_work(cm_wq, &cm_monitor_work, polling_jiffy); | 513 | mod_delayed_work(cm_wq, &cm_monitor_work, polling_jiffy); |
515 | } | 514 | } |
516 | 515 | ||
517 | out: | 516 | out: |
@@ -546,10 +545,8 @@ static void fullbatt_handler(struct charger_manager *cm) | |||
546 | if (cm_suspended) | 545 | if (cm_suspended) |
547 | device_set_wakeup_capable(cm->dev, true); | 546 | device_set_wakeup_capable(cm->dev, true); |
548 | 547 | ||
549 | if (delayed_work_pending(&cm->fullbatt_vchk_work)) | 548 | mod_delayed_work(cm_wq, &cm->fullbatt_vchk_work, |
550 | cancel_delayed_work(&cm->fullbatt_vchk_work); | 549 | msecs_to_jiffies(desc->fullbatt_vchkdrop_ms)); |
551 | queue_delayed_work(cm_wq, &cm->fullbatt_vchk_work, | ||
552 | msecs_to_jiffies(desc->fullbatt_vchkdrop_ms)); | ||
553 | cm->fullbatt_vchk_jiffies_at = jiffies + msecs_to_jiffies( | 550 | cm->fullbatt_vchk_jiffies_at = jiffies + msecs_to_jiffies( |
554 | desc->fullbatt_vchkdrop_ms); | 551 | desc->fullbatt_vchkdrop_ms); |
555 | 552 | ||
diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c index 74c6b23aeabf..b19bfe400f8c 100644 --- a/drivers/power/collie_battery.c +++ b/drivers/power/collie_battery.c | |||
@@ -290,7 +290,7 @@ static struct gpio collie_batt_gpios[] = { | |||
290 | static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state) | 290 | static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state) |
291 | { | 291 | { |
292 | /* flush all pending status updates */ | 292 | /* flush all pending status updates */ |
293 | flush_work_sync(&bat_work); | 293 | flush_work(&bat_work); |
294 | return 0; | 294 | return 0; |
295 | } | 295 | } |
296 | 296 | ||
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index 076e211a40b7..704e652072be 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c | |||
@@ -355,8 +355,7 @@ static void ds2760_battery_external_power_changed(struct power_supply *psy) | |||
355 | 355 | ||
356 | dev_dbg(di->dev, "%s\n", __func__); | 356 | dev_dbg(di->dev, "%s\n", __func__); |
357 | 357 | ||
358 | cancel_delayed_work(&di->monitor_work); | 358 | mod_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ/10); |
359 | queue_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ/10); | ||
360 | } | 359 | } |
361 | 360 | ||
362 | 361 | ||
@@ -401,8 +400,7 @@ static void ds2760_battery_set_charged(struct power_supply *psy) | |||
401 | 400 | ||
402 | /* postpone the actual work by 20 secs. This is for debouncing GPIO | 401 | /* postpone the actual work by 20 secs. This is for debouncing GPIO |
403 | * signals and to let the current value settle. See AN4188. */ | 402 | * signals and to let the current value settle. See AN4188. */ |
404 | cancel_delayed_work(&di->set_charged_work); | 403 | mod_delayed_work(di->monitor_wqueue, &di->set_charged_work, HZ * 20); |
405 | queue_delayed_work(di->monitor_wqueue, &di->set_charged_work, HZ * 20); | ||
406 | } | 404 | } |
407 | 405 | ||
408 | static int ds2760_battery_get_property(struct power_supply *psy, | 406 | static int ds2760_battery_get_property(struct power_supply *psy, |
@@ -616,8 +614,7 @@ static int ds2760_battery_resume(struct platform_device *pdev) | |||
616 | di->charge_status = POWER_SUPPLY_STATUS_UNKNOWN; | 614 | di->charge_status = POWER_SUPPLY_STATUS_UNKNOWN; |
617 | power_supply_changed(&di->bat); | 615 | power_supply_changed(&di->bat); |
618 | 616 | ||
619 | cancel_delayed_work(&di->monitor_work); | 617 | mod_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ); |
620 | queue_delayed_work(di->monitor_wqueue, &di->monitor_work, HZ); | ||
621 | 618 | ||
622 | return 0; | 619 | return 0; |
623 | } | 620 | } |
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c index 8dbc7bfaab14..ffbed5e5b945 100644 --- a/drivers/power/jz4740-battery.c +++ b/drivers/power/jz4740-battery.c | |||
@@ -173,16 +173,14 @@ static void jz_battery_external_power_changed(struct power_supply *psy) | |||
173 | { | 173 | { |
174 | struct jz_battery *jz_battery = psy_to_jz_battery(psy); | 174 | struct jz_battery *jz_battery = psy_to_jz_battery(psy); |
175 | 175 | ||
176 | cancel_delayed_work(&jz_battery->work); | 176 | mod_delayed_work(system_wq, &jz_battery->work, 0); |
177 | schedule_delayed_work(&jz_battery->work, 0); | ||
178 | } | 177 | } |
179 | 178 | ||
180 | static irqreturn_t jz_battery_charge_irq(int irq, void *data) | 179 | static irqreturn_t jz_battery_charge_irq(int irq, void *data) |
181 | { | 180 | { |
182 | struct jz_battery *jz_battery = data; | 181 | struct jz_battery *jz_battery = data; |
183 | 182 | ||
184 | cancel_delayed_work(&jz_battery->work); | 183 | mod_delayed_work(system_wq, &jz_battery->work, 0); |
185 | schedule_delayed_work(&jz_battery->work, 0); | ||
186 | 184 | ||
187 | return IRQ_HANDLED; | 185 | return IRQ_HANDLED; |
188 | } | 186 | } |
diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c index c284143cfcd7..58e67830143c 100644 --- a/drivers/power/max17040_battery.c +++ b/drivers/power/max17040_battery.c | |||
@@ -232,7 +232,7 @@ static int __devinit max17040_probe(struct i2c_client *client, | |||
232 | max17040_reset(client); | 232 | max17040_reset(client); |
233 | max17040_get_version(client); | 233 | max17040_get_version(client); |
234 | 234 | ||
235 | INIT_DELAYED_WORK_DEFERRABLE(&chip->work, max17040_work); | 235 | INIT_DEFERRABLE_WORK(&chip->work, max17040_work); |
236 | schedule_delayed_work(&chip->work, MAX17040_DELAY); | 236 | schedule_delayed_work(&chip->work, MAX17040_DELAY); |
237 | 237 | ||
238 | return 0; | 238 | return 0; |
diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c index 28bbe7e094e3..51199b5ce221 100644 --- a/drivers/power/tosa_battery.c +++ b/drivers/power/tosa_battery.c | |||
@@ -327,7 +327,7 @@ static struct gpio tosa_bat_gpios[] = { | |||
327 | static int tosa_bat_suspend(struct platform_device *dev, pm_message_t state) | 327 | static int tosa_bat_suspend(struct platform_device *dev, pm_message_t state) |
328 | { | 328 | { |
329 | /* flush all pending status updates */ | 329 | /* flush all pending status updates */ |
330 | flush_work_sync(&bat_work); | 330 | flush_work(&bat_work); |
331 | return 0; | 331 | return 0; |
332 | } | 332 | } |
333 | 333 | ||
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c index d2d4c08c681c..1245fe1f48c3 100644 --- a/drivers/power/wm97xx_battery.c +++ b/drivers/power/wm97xx_battery.c | |||
@@ -146,7 +146,7 @@ static irqreturn_t wm97xx_chrg_irq(int irq, void *data) | |||
146 | #ifdef CONFIG_PM | 146 | #ifdef CONFIG_PM |
147 | static int wm97xx_bat_suspend(struct device *dev) | 147 | static int wm97xx_bat_suspend(struct device *dev) |
148 | { | 148 | { |
149 | flush_work_sync(&bat_work); | 149 | flush_work(&bat_work); |
150 | return 0; | 150 | return 0; |
151 | } | 151 | } |
152 | 152 | ||
diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c index 8c9a607ea77a..5757d0d6782f 100644 --- a/drivers/power/z2_battery.c +++ b/drivers/power/z2_battery.c | |||
@@ -276,7 +276,7 @@ static int z2_batt_suspend(struct device *dev) | |||
276 | struct i2c_client *client = to_i2c_client(dev); | 276 | struct i2c_client *client = to_i2c_client(dev); |
277 | struct z2_charger *charger = i2c_get_clientdata(client); | 277 | struct z2_charger *charger = i2c_get_clientdata(client); |
278 | 278 | ||
279 | flush_work_sync(&charger->bat_work); | 279 | flush_work(&charger->bat_work); |
280 | return 0; | 280 | return 0; |
281 | } | 281 | } |
282 | 282 | ||
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2e0352dc26bd..5c4829cba6a6 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -3476,7 +3476,7 @@ void regulator_unregister(struct regulator_dev *rdev) | |||
3476 | regulator_put(rdev->supply); | 3476 | regulator_put(rdev->supply); |
3477 | mutex_lock(®ulator_list_mutex); | 3477 | mutex_lock(®ulator_list_mutex); |
3478 | debugfs_remove_recursive(rdev->debugfs); | 3478 | debugfs_remove_recursive(rdev->debugfs); |
3479 | flush_work_sync(&rdev->disable_work.work); | 3479 | flush_work(&rdev->disable_work.work); |
3480 | WARN_ON(rdev->open_count); | 3480 | WARN_ON(rdev->open_count); |
3481 | unset_regulator_supplies(rdev); | 3481 | unset_regulator_supplies(rdev); |
3482 | list_del(&rdev->list); | 3482 | list_del(&rdev->list); |
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index def24a1079ad..33c52bc2c7b4 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -999,7 +999,7 @@ static void arcmsr_remove(struct pci_dev *pdev) | |||
999 | int poll_count = 0; | 999 | int poll_count = 0; |
1000 | arcmsr_free_sysfs_attr(acb); | 1000 | arcmsr_free_sysfs_attr(acb); |
1001 | scsi_remove_host(host); | 1001 | scsi_remove_host(host); |
1002 | flush_work_sync(&acb->arcmsr_do_message_isr_bh); | 1002 | flush_work(&acb->arcmsr_do_message_isr_bh); |
1003 | del_timer_sync(&acb->eternal_timer); | 1003 | del_timer_sync(&acb->eternal_timer); |
1004 | arcmsr_disable_outbound_ints(acb); | 1004 | arcmsr_disable_outbound_ints(acb); |
1005 | arcmsr_stop_adapter_bgrb(acb); | 1005 | arcmsr_stop_adapter_bgrb(acb); |
@@ -1045,7 +1045,7 @@ static void arcmsr_shutdown(struct pci_dev *pdev) | |||
1045 | (struct AdapterControlBlock *)host->hostdata; | 1045 | (struct AdapterControlBlock *)host->hostdata; |
1046 | del_timer_sync(&acb->eternal_timer); | 1046 | del_timer_sync(&acb->eternal_timer); |
1047 | arcmsr_disable_outbound_ints(acb); | 1047 | arcmsr_disable_outbound_ints(acb); |
1048 | flush_work_sync(&acb->arcmsr_do_message_isr_bh); | 1048 | flush_work(&acb->arcmsr_do_message_isr_bh); |
1049 | arcmsr_stop_adapter_bgrb(acb); | 1049 | arcmsr_stop_adapter_bgrb(acb); |
1050 | arcmsr_flush_adapter_cache(acb); | 1050 | arcmsr_flush_adapter_cache(acb); |
1051 | } | 1051 | } |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 0a2c5a8ebb82..45e192a51005 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -9020,7 +9020,7 @@ static void __ipr_remove(struct pci_dev *pdev) | |||
9020 | 9020 | ||
9021 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); | 9021 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); |
9022 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); | 9022 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); |
9023 | flush_work_sync(&ioa_cfg->work_q); | 9023 | flush_work(&ioa_cfg->work_q); |
9024 | spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); | 9024 | spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); |
9025 | 9025 | ||
9026 | spin_lock(&ipr_driver_lock); | 9026 | spin_lock(&ipr_driver_lock); |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index ea8a0b47d66d..af763eab2039 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -5459,7 +5459,7 @@ static void __devexit pmcraid_remove(struct pci_dev *pdev) | |||
5459 | pmcraid_shutdown(pdev); | 5459 | pmcraid_shutdown(pdev); |
5460 | 5460 | ||
5461 | pmcraid_disable_interrupts(pinstance, ~0); | 5461 | pmcraid_disable_interrupts(pinstance, ~0); |
5462 | flush_work_sync(&pinstance->worker_q); | 5462 | flush_work(&pinstance->worker_q); |
5463 | 5463 | ||
5464 | pmcraid_kill_tasklets(pinstance); | 5464 | pmcraid_kill_tasklets(pinstance); |
5465 | pmcraid_unregister_interrupt_handler(pinstance); | 5465 | pmcraid_unregister_interrupt_handler(pinstance); |
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 5b30132960c7..bddc97c5c8e9 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -969,7 +969,7 @@ void qlt_stop_phase1(struct qla_tgt *tgt) | |||
969 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 969 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
970 | mutex_unlock(&ha->tgt.tgt_mutex); | 970 | mutex_unlock(&ha->tgt.tgt_mutex); |
971 | 971 | ||
972 | flush_delayed_work_sync(&tgt->sess_del_work); | 972 | flush_delayed_work(&tgt->sess_del_work); |
973 | 973 | ||
974 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf009, | 974 | ql_dbg(ql_dbg_tgt_mgt, vha, 0xf009, |
975 | "Waiting for sess works (tgt %p)", tgt); | 975 | "Waiting for sess works (tgt %p)", tgt); |
diff --git a/drivers/staging/ccg/u_ether.c b/drivers/staging/ccg/u_ether.c index 1154a99dc8db..d0dabcf015a9 100644 --- a/drivers/staging/ccg/u_ether.c +++ b/drivers/staging/ccg/u_ether.c | |||
@@ -827,7 +827,7 @@ void gether_cleanup(void) | |||
827 | return; | 827 | return; |
828 | 828 | ||
829 | unregister_netdev(the_dev->net); | 829 | unregister_netdev(the_dev->net); |
830 | flush_work_sync(&the_dev->work); | 830 | flush_work(&the_dev->work); |
831 | free_netdev(the_dev->net); | 831 | free_netdev(the_dev->net); |
832 | 832 | ||
833 | the_dev = NULL; | 833 | the_dev = NULL; |
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 24d8eebc1d10..094fdc366f30 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
@@ -264,7 +264,7 @@ int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data, | |||
264 | list_add_tail(&msg->node, &nvec->tx_data); | 264 | list_add_tail(&msg->node, &nvec->tx_data); |
265 | spin_unlock_irqrestore(&nvec->tx_lock, flags); | 265 | spin_unlock_irqrestore(&nvec->tx_lock, flags); |
266 | 266 | ||
267 | queue_work(system_nrt_wq, &nvec->tx_work); | 267 | schedule_work(&nvec->tx_work); |
268 | 268 | ||
269 | return 0; | 269 | return 0; |
270 | } | 270 | } |
@@ -471,7 +471,7 @@ static void nvec_rx_completed(struct nvec_chip *nvec) | |||
471 | if (!nvec_msg_is_event(nvec->rx)) | 471 | if (!nvec_msg_is_event(nvec->rx)) |
472 | complete(&nvec->ec_transfer); | 472 | complete(&nvec->ec_transfer); |
473 | 473 | ||
474 | queue_work(system_nrt_wq, &nvec->rx_work); | 474 | schedule_work(&nvec->rx_work); |
475 | } | 475 | } |
476 | 476 | ||
477 | /** | 477 | /** |
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 2ab31e4f02cc..67789b8345d2 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
@@ -694,17 +694,14 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) | |||
694 | static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, | 694 | static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, |
695 | int delay) | 695 | int delay) |
696 | { | 696 | { |
697 | cancel_delayed_work(&(tz->poll_queue)); | ||
698 | |||
699 | if (!delay) | ||
700 | return; | ||
701 | |||
702 | if (delay > 1000) | 697 | if (delay > 1000) |
703 | queue_delayed_work(system_freezable_wq, &(tz->poll_queue), | 698 | mod_delayed_work(system_freezable_wq, &tz->poll_queue, |
704 | round_jiffies(msecs_to_jiffies(delay))); | 699 | round_jiffies(msecs_to_jiffies(delay))); |
700 | else if (delay) | ||
701 | mod_delayed_work(system_freezable_wq, &tz->poll_queue, | ||
702 | msecs_to_jiffies(delay)); | ||
705 | else | 703 | else |
706 | queue_delayed_work(system_freezable_wq, &(tz->poll_queue), | 704 | cancel_delayed_work(&tz->poll_queue); |
707 | msecs_to_jiffies(delay)); | ||
708 | } | 705 | } |
709 | 706 | ||
710 | static void thermal_zone_device_passive(struct thermal_zone_device *tz, | 707 | static void thermal_zone_device_passive(struct thermal_zone_device *tz, |
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index 0083bc1f63f4..5b95b4f28cf3 100644 --- a/drivers/tty/hvc/hvsi.c +++ b/drivers/tty/hvc/hvsi.c | |||
@@ -765,7 +765,7 @@ static void hvsi_flush_output(struct hvsi_struct *hp) | |||
765 | 765 | ||
766 | /* 'writer' could still be pending if it didn't see n_outbuf = 0 yet */ | 766 | /* 'writer' could still be pending if it didn't see n_outbuf = 0 yet */ |
767 | cancel_delayed_work_sync(&hp->writer); | 767 | cancel_delayed_work_sync(&hp->writer); |
768 | flush_work_sync(&hp->handshaker); | 768 | flush_work(&hp->handshaker); |
769 | 769 | ||
770 | /* | 770 | /* |
771 | * it's also possible that our timeout expired and hvsi_write_worker | 771 | * it's also possible that our timeout expired and hvsi_write_worker |
diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c index 0aeb5a38d296..b4ba0670dc54 100644 --- a/drivers/tty/ipwireless/hardware.c +++ b/drivers/tty/ipwireless/hardware.c | |||
@@ -1729,7 +1729,7 @@ void ipwireless_hardware_free(struct ipw_hardware *hw) | |||
1729 | 1729 | ||
1730 | ipwireless_stop_interrupts(hw); | 1730 | ipwireless_stop_interrupts(hw); |
1731 | 1731 | ||
1732 | flush_work_sync(&hw->work_rx); | 1732 | flush_work(&hw->work_rx); |
1733 | 1733 | ||
1734 | for (i = 0; i < NL_NUM_OF_ADDRESSES; i++) | 1734 | for (i = 0; i < NL_NUM_OF_ADDRESSES; i++) |
1735 | if (hw->packet_assembler[i] != NULL) | 1735 | if (hw->packet_assembler[i] != NULL) |
diff --git a/drivers/tty/ipwireless/network.c b/drivers/tty/ipwireless/network.c index d2af155dec8b..57102e66165a 100644 --- a/drivers/tty/ipwireless/network.c +++ b/drivers/tty/ipwireless/network.c | |||
@@ -435,8 +435,8 @@ void ipwireless_network_free(struct ipw_network *network) | |||
435 | network->shutting_down = 1; | 435 | network->shutting_down = 1; |
436 | 436 | ||
437 | ipwireless_ppp_close(network); | 437 | ipwireless_ppp_close(network); |
438 | flush_work_sync(&network->work_go_online); | 438 | flush_work(&network->work_go_online); |
439 | flush_work_sync(&network->work_go_offline); | 439 | flush_work(&network->work_go_offline); |
440 | 440 | ||
441 | ipwireless_stop_interrupts(network->hardware); | 441 | ipwireless_stop_interrupts(network->hardware); |
442 | ipwireless_associate_network(network->hardware, NULL); | 442 | ipwireless_associate_network(network->hardware, NULL); |
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index 3f63d834cbc9..c0b334327d93 100644 --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c | |||
@@ -122,7 +122,7 @@ static void kgdboc_unregister_kbd(void) | |||
122 | i--; | 122 | i--; |
123 | } | 123 | } |
124 | } | 124 | } |
125 | flush_work_sync(&kgdboc_restore_input_work); | 125 | flush_work(&kgdboc_restore_input_work); |
126 | } | 126 | } |
127 | #else /* ! CONFIG_KDB_KEYBOARD */ | 127 | #else /* ! CONFIG_KDB_KEYBOARD */ |
128 | #define kgdboc_register_kbd(x) 0 | 128 | #define kgdboc_register_kbd(x) 0 |
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index ccc2f35adff1..6ede6fd92b4c 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -1227,7 +1227,7 @@ static int serial_omap_suspend(struct device *dev) | |||
1227 | struct uart_omap_port *up = dev_get_drvdata(dev); | 1227 | struct uart_omap_port *up = dev_get_drvdata(dev); |
1228 | 1228 | ||
1229 | uart_suspend_port(&serial_omap_reg, &up->port); | 1229 | uart_suspend_port(&serial_omap_reg, &up->port); |
1230 | flush_work_sync(&up->qos_work); | 1230 | flush_work(&up->qos_work); |
1231 | 1231 | ||
1232 | return 0; | 1232 | return 0; |
1233 | } | 1233 | } |
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 4d7b56268c79..0f2a2c5e704c 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c | |||
@@ -523,9 +523,9 @@ static int tty_ldisc_halt(struct tty_struct *tty) | |||
523 | */ | 523 | */ |
524 | static void tty_ldisc_flush_works(struct tty_struct *tty) | 524 | static void tty_ldisc_flush_works(struct tty_struct *tty) |
525 | { | 525 | { |
526 | flush_work_sync(&tty->hangup_work); | 526 | flush_work(&tty->hangup_work); |
527 | flush_work_sync(&tty->SAK_work); | 527 | flush_work(&tty->SAK_work); |
528 | flush_work_sync(&tty->buf.work); | 528 | flush_work(&tty->buf.work); |
529 | } | 529 | } |
530 | 530 | ||
531 | /** | 531 | /** |
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 975e9c6691d6..807627b36cc8 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_work_sync(&instance->status_check_work); | 721 | flush_work(&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/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index e1f8b2c973fe..defff43950bc 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c | |||
@@ -2262,7 +2262,7 @@ static void uea_stop(struct uea_softc *sc) | |||
2262 | usb_free_urb(sc->urb_int); | 2262 | usb_free_urb(sc->urb_int); |
2263 | 2263 | ||
2264 | /* flush the work item, when no one can schedule it */ | 2264 | /* flush the work item, when no one can schedule it */ |
2265 | flush_work_sync(&sc->task); | 2265 | flush_work(&sc->task); |
2266 | 2266 | ||
2267 | release_firmware(sc->dsp_firm); | 2267 | release_firmware(sc->dsp_firm); |
2268 | uea_leaves(INS_TO_USBDEV(sc)); | 2268 | uea_leaves(INS_TO_USBDEV(sc)); |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index b9c46900c2c1..6458764994ef 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -834,7 +834,7 @@ void gether_cleanup(void) | |||
834 | return; | 834 | return; |
835 | 835 | ||
836 | unregister_netdev(the_dev->net); | 836 | unregister_netdev(the_dev->net); |
837 | flush_work_sync(&the_dev->work); | 837 | flush_work(&the_dev->work); |
838 | free_netdev(the_dev->net); | 838 | free_netdev(the_dev->net); |
839 | 839 | ||
840 | the_dev = NULL; | 840 | the_dev = NULL; |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 6780010e9c3c..4a1d64d92338 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -893,7 +893,7 @@ static void ohci_stop (struct usb_hcd *hcd) | |||
893 | ohci_dump (ohci, 1); | 893 | ohci_dump (ohci, 1); |
894 | 894 | ||
895 | if (quirk_nec(ohci)) | 895 | if (quirk_nec(ohci)) |
896 | flush_work_sync(&ohci->nec_work); | 896 | flush_work(&ohci->nec_work); |
897 | 897 | ||
898 | ohci_usb_reset (ohci); | 898 | ohci_usb_reset (ohci); |
899 | ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); | 899 | 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 81f1f9a0be8f..ceee2119bffa 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -1230,7 +1230,7 @@ static int __exit isp1301_remove(struct i2c_client *i2c) | |||
1230 | isp->timer.data = 0; | 1230 | isp->timer.data = 0; |
1231 | set_bit(WORK_STOP, &isp->todo); | 1231 | set_bit(WORK_STOP, &isp->todo); |
1232 | del_timer_sync(&isp->timer); | 1232 | del_timer_sync(&isp->timer); |
1233 | flush_work_sync(&isp->work); | 1233 | flush_work(&isp->work); |
1234 | 1234 | ||
1235 | put_device(&i2c->dev); | 1235 | put_device(&i2c->dev); |
1236 | the_transceiver = NULL; | 1236 | the_transceiver = NULL; |
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 3f5acc7771da..6b5e6e0e202f 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -906,7 +906,7 @@ static int taal_probe(struct omap_dss_device *dssdev) | |||
906 | r = -ENOMEM; | 906 | r = -ENOMEM; |
907 | goto err_wq; | 907 | goto err_wq; |
908 | } | 908 | } |
909 | INIT_DELAYED_WORK_DEFERRABLE(&td->esd_work, taal_esd_work); | 909 | INIT_DEFERRABLE_WORK(&td->esd_work, taal_esd_work); |
910 | INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work); | 910 | INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work); |
911 | 911 | ||
912 | dev_set_drvdata(&dssdev->dev, td); | 912 | dev_set_drvdata(&dssdev->dev, td); |
@@ -962,8 +962,8 @@ static int taal_probe(struct omap_dss_device *dssdev) | |||
962 | goto err_irq; | 962 | goto err_irq; |
963 | } | 963 | } |
964 | 964 | ||
965 | INIT_DELAYED_WORK_DEFERRABLE(&td->te_timeout_work, | 965 | INIT_DEFERRABLE_WORK(&td->te_timeout_work, |
966 | taal_te_timeout_work_callback); | 966 | taal_te_timeout_work_callback); |
967 | 967 | ||
968 | dev_dbg(&dssdev->dev, "Using GPIO TE\n"); | 968 | dev_dbg(&dssdev->dev, "Using GPIO TE\n"); |
969 | } | 969 | } |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index b07e8864f82f..05ee04667af1 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -4306,7 +4306,7 @@ static void dsi_framedone_irq_callback(void *data, u32 mask) | |||
4306 | * and is sending the data. | 4306 | * and is sending the data. |
4307 | */ | 4307 | */ |
4308 | 4308 | ||
4309 | __cancel_delayed_work(&dsi->framedone_timeout_work); | 4309 | cancel_delayed_work(&dsi->framedone_timeout_work); |
4310 | 4310 | ||
4311 | dsi_handle_framedone(dsidev, 0); | 4311 | dsi_handle_framedone(dsidev, 0); |
4312 | } | 4312 | } |
@@ -4863,8 +4863,8 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev) | |||
4863 | mutex_init(&dsi->lock); | 4863 | mutex_init(&dsi->lock); |
4864 | sema_init(&dsi->bus_lock, 1); | 4864 | sema_init(&dsi->bus_lock, 1); |
4865 | 4865 | ||
4866 | INIT_DELAYED_WORK_DEFERRABLE(&dsi->framedone_timeout_work, | 4866 | INIT_DEFERRABLE_WORK(&dsi->framedone_timeout_work, |
4867 | dsi_framedone_timeout_work_callback); | 4867 | dsi_framedone_timeout_work_callback); |
4868 | 4868 | ||
4869 | #ifdef DSI_CATCH_MISSING_TE | 4869 | #ifdef DSI_CATCH_MISSING_TE |
4870 | init_timer(&dsi->te_timer); | 4870 | init_timer(&dsi->te_timer); |