diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-22 19:13:54 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-22 19:13:54 -0500 |
commit | f01c18456993bab43067b678f56c87ca954aa43b (patch) | |
tree | 3e0cd0cdf1a57618202b46a7126125902e3ab832 /drivers/scsi/aacraid/linit.c | |
parent | 949ec2c8e6b7b89179b85baf6309c009e1a1b951 (diff) | |
parent | 1c2e02750b992703a8a18634e08b04353face243 (diff) | |
download | blackbird-obmc-linux-f01c18456993bab43067b678f56c87ca954aa43b.tar.gz blackbird-obmc-linux-f01c18456993bab43067b678f56c87ca954aa43b.zip |
Merge branch 'master'
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 @@ #include <linux/syscalls.h> #include <linux/delay.h> #include <linux/smp_lock.h> +#include <linux/kthread.h> #include <asm/semaphore.h> #include <scsi/scsi.h> @@ -850,10 +851,10 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, /* * Start any kernel threads needed */ - aac->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, - aac, 0); - if (aac->thread_pid < 0) { + aac->thread = kthread_run(aac_command_thread, aac, AAC_DRIVERNAME); + if (IS_ERR(aac->thread)) { printk(KERN_ERR "aacraid: Unable to create command thread.\n"); + error = PTR_ERR(aac->thread); goto out_deinit; } @@ -934,9 +935,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, return 0; out_deinit: - kill_proc(aac->thread_pid, SIGKILL, 0); - wait_for_completion(&aac->aif_completion); - + kthread_stop(aac->thread); aac_send_shutdown(aac); aac_adapter_disable_int(aac); free_irq(pdev->irq, aac); @@ -970,8 +969,7 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) scsi_remove_host(shost); - kill_proc(aac->thread_pid, SIGKILL, 0); - wait_for_completion(&aac->aif_completion); + kthread_stop(aac->thread); aac_send_shutdown(aac); aac_adapter_disable_int(aac); |