diff options
author | Tejun Heo <tj@kernel.org> | 2011-01-24 08:57:28 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-12 11:31:02 -0500 |
commit | a684b8da35a429a246ec2a91e2742bdff5209709 (patch) | |
tree | 656a47c18b4c8d8f138175702a33846a5d3194e2 /drivers/scsi | |
parent | 75c65a5edaa8b815c1428314eaf696788f1ebbdb (diff) |
[SCSI] remove flush_scheduled_work() usages
Simple conversions to drop flush_scheduled_work() usages in
drivers/scsi. More involved ones will be done in separate patches.
* NCR5380, megaraid_sas: cancel_delayed_work() +
flush_scheduled_work() -> cancel_delayed_work_sync().
* mpt2sas_scsih: drop unnecessary flush_scheduled_work().
* arcmsr_hba, ipr, pmcraid: flush the used work explicitly instead of
using flush_scheduled_work().
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/NCR5380.c | 3 | ||||
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 4 | ||||
-rw-r--r-- | drivers/scsi/ipr.c | 2 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 6 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 1 | ||||
-rw-r--r-- | drivers/scsi/pmcraid.c | 2 |
6 files changed, 7 insertions, 11 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 9a5629f94f95..e7cd2fcbe036 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -936,8 +936,7 @@ static void NCR5380_exit(struct Scsi_Host *instance) | |||
936 | { | 936 | { |
937 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; | 937 | struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata; |
938 | 938 | ||
939 | cancel_delayed_work(&hostdata->coroutine); | 939 | cancel_delayed_work_sync(&hostdata->coroutine); |
940 | flush_scheduled_work(); | ||
941 | } | 940 | } |
942 | 941 | ||
943 | /** | 942 | /** |
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 1cadcd6b7da6..d6d17a1a41df 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -1022,7 +1022,7 @@ static void arcmsr_remove(struct pci_dev *pdev) | |||
1022 | int poll_count = 0; | 1022 | int poll_count = 0; |
1023 | arcmsr_free_sysfs_attr(acb); | 1023 | arcmsr_free_sysfs_attr(acb); |
1024 | scsi_remove_host(host); | 1024 | scsi_remove_host(host); |
1025 | flush_scheduled_work(); | 1025 | flush_work_sync(&acb->arcmsr_do_message_isr_bh); |
1026 | del_timer_sync(&acb->eternal_timer); | 1026 | del_timer_sync(&acb->eternal_timer); |
1027 | arcmsr_disable_outbound_ints(acb); | 1027 | arcmsr_disable_outbound_ints(acb); |
1028 | arcmsr_stop_adapter_bgrb(acb); | 1028 | arcmsr_stop_adapter_bgrb(acb); |
@@ -1068,7 +1068,7 @@ static void arcmsr_shutdown(struct pci_dev *pdev) | |||
1068 | (struct AdapterControlBlock *)host->hostdata; | 1068 | (struct AdapterControlBlock *)host->hostdata; |
1069 | del_timer_sync(&acb->eternal_timer); | 1069 | del_timer_sync(&acb->eternal_timer); |
1070 | arcmsr_disable_outbound_ints(acb); | 1070 | arcmsr_disable_outbound_ints(acb); |
1071 | flush_scheduled_work(); | 1071 | flush_work_sync(&acb->arcmsr_do_message_isr_bh); |
1072 | arcmsr_stop_adapter_bgrb(acb); | 1072 | arcmsr_stop_adapter_bgrb(acb); |
1073 | arcmsr_flush_adapter_cache(acb); | 1073 | arcmsr_flush_adapter_cache(acb); |
1074 | } | 1074 | } |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 9c5c8be72231..a8e24f06b8d8 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -8865,7 +8865,7 @@ static void __ipr_remove(struct pci_dev *pdev) | |||
8865 | 8865 | ||
8866 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); | 8866 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags); |
8867 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); | 8867 | wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload); |
8868 | flush_scheduled_work(); | 8868 | flush_work_sync(&ioa_cfg->work_q); |
8869 | spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); | 8869 | spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags); |
8870 | 8870 | ||
8871 | spin_lock(&ipr_driver_lock); | 8871 | spin_lock(&ipr_driver_lock); |
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 5d6d07bd1cd0..e7c9b41def7b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -4242,9 +4242,8 @@ megasas_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4242 | /* cancel the delayed work if this work still in queue */ | 4242 | /* cancel the delayed work if this work still in queue */ |
4243 | if (instance->ev != NULL) { | 4243 | if (instance->ev != NULL) { |
4244 | struct megasas_aen_event *ev = instance->ev; | 4244 | struct megasas_aen_event *ev = instance->ev; |
4245 | cancel_delayed_work( | 4245 | cancel_delayed_work_sync( |
4246 | (struct delayed_work *)&ev->hotplug_work); | 4246 | (struct delayed_work *)&ev->hotplug_work); |
4247 | flush_scheduled_work(); | ||
4248 | instance->ev = NULL; | 4247 | instance->ev = NULL; |
4249 | } | 4248 | } |
4250 | 4249 | ||
@@ -4417,9 +4416,8 @@ static void __devexit megasas_detach_one(struct pci_dev *pdev) | |||
4417 | /* cancel the delayed work if this work still in queue*/ | 4416 | /* cancel the delayed work if this work still in queue*/ |
4418 | if (instance->ev != NULL) { | 4417 | if (instance->ev != NULL) { |
4419 | struct megasas_aen_event *ev = instance->ev; | 4418 | struct megasas_aen_event *ev = instance->ev; |
4420 | cancel_delayed_work( | 4419 | cancel_delayed_work_sync( |
4421 | (struct delayed_work *)&ev->hotplug_work); | 4420 | (struct delayed_work *)&ev->hotplug_work); |
4422 | flush_scheduled_work(); | ||
4423 | instance->ev = NULL; | 4421 | instance->ev = NULL; |
4424 | } | 4422 | } |
4425 | 4423 | ||
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index eda347c57979..b375150a379b 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -6935,7 +6935,6 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state) | |||
6935 | u32 device_state; | 6935 | u32 device_state; |
6936 | 6936 | ||
6937 | mpt2sas_base_stop_watchdog(ioc); | 6937 | mpt2sas_base_stop_watchdog(ioc); |
6938 | flush_scheduled_work(); | ||
6939 | scsi_block_requests(shost); | 6938 | scsi_block_requests(shost); |
6940 | device_state = pci_choose_state(pdev, state); | 6939 | device_state = pci_choose_state(pdev, state); |
6941 | printk(MPT2SAS_INFO_FMT "pdev=0x%p, slot=%s, entering " | 6940 | printk(MPT2SAS_INFO_FMT "pdev=0x%p, slot=%s, entering " |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 321cf3ae8630..bcf858e88c64 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -5454,7 +5454,7 @@ static void __devexit pmcraid_remove(struct pci_dev *pdev) | |||
5454 | pmcraid_shutdown(pdev); | 5454 | pmcraid_shutdown(pdev); |
5455 | 5455 | ||
5456 | pmcraid_disable_interrupts(pinstance, ~0); | 5456 | pmcraid_disable_interrupts(pinstance, ~0); |
5457 | flush_scheduled_work(); | 5457 | flush_work_sync(&pinstance->worker_q); |
5458 | 5458 | ||
5459 | pmcraid_kill_tasklets(pinstance); | 5459 | pmcraid_kill_tasklets(pinstance); |
5460 | pmcraid_unregister_interrupt_handler(pinstance); | 5460 | pmcraid_unregister_interrupt_handler(pinstance); |