diff options
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 271617890562..c2596335549d 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/syscalls.h> | 48 | #include <linux/syscalls.h> |
49 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
50 | #include <linux/smp_lock.h> | 50 | #include <linux/smp_lock.h> |
51 | #include <linux/kthread.h> | ||
51 | #include <asm/semaphore.h> | 52 | #include <asm/semaphore.h> |
52 | 53 | ||
53 | #include <scsi/scsi.h> | 54 | #include <scsi/scsi.h> |
@@ -850,10 +851,10 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
850 | /* | 851 | /* |
851 | * Start any kernel threads needed | 852 | * Start any kernel threads needed |
852 | */ | 853 | */ |
853 | aac->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, | 854 | aac->thread = kthread_run(aac_command_thread, aac, AAC_DRIVERNAME); |
854 | aac, 0); | 855 | if (IS_ERR(aac->thread)) { |
855 | if (aac->thread_pid < 0) { | ||
856 | printk(KERN_ERR "aacraid: Unable to create command thread.\n"); | 856 | printk(KERN_ERR "aacraid: Unable to create command thread.\n"); |
857 | error = PTR_ERR(aac->thread); | ||
857 | goto out_deinit; | 858 | goto out_deinit; |
858 | } | 859 | } |
859 | 860 | ||
@@ -934,9 +935,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
934 | return 0; | 935 | return 0; |
935 | 936 | ||
936 | out_deinit: | 937 | out_deinit: |
937 | kill_proc(aac->thread_pid, SIGKILL, 0); | 938 | kthread_stop(aac->thread); |
938 | wait_for_completion(&aac->aif_completion); | ||
939 | |||
940 | aac_send_shutdown(aac); | 939 | aac_send_shutdown(aac); |
941 | aac_adapter_disable_int(aac); | 940 | aac_adapter_disable_int(aac); |
942 | free_irq(pdev->irq, aac); | 941 | free_irq(pdev->irq, aac); |
@@ -970,8 +969,7 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) | |||
970 | 969 | ||
971 | scsi_remove_host(shost); | 970 | scsi_remove_host(shost); |
972 | 971 | ||
973 | kill_proc(aac->thread_pid, SIGKILL, 0); | 972 | kthread_stop(aac->thread); |
974 | wait_for_completion(&aac->aif_completion); | ||
975 | 973 | ||
976 | aac_send_shutdown(aac); | 974 | aac_send_shutdown(aac); |
977 | aac_adapter_disable_int(aac); | 975 | aac_adapter_disable_int(aac); |