diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-08-16 21:30:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:18 -0700 |
commit | 659473ceaacb678856dcfb395ee4a290a078f8e0 (patch) | |
tree | ed2c85d047acb769a5c1162c8e4b9f5795c7f42d /drivers/staging | |
parent | 382280ae9d0f94a7ffed1f8963be16b96348684c (diff) | |
download | op-kernel-dev-659473ceaacb678856dcfb395ee4a290a078f8e0.zip op-kernel-dev-659473ceaacb678856dcfb395ee4a290a078f8e0.tar.gz |
Staging: rt3070: kill TimerQThr thread first in RT28xxThreadTerminate()
* kill TimerQThr thread first in RT28xxThreadTerminate()
* remove the debugging printk() while at it
This makes rt3070 driver match rt2870 driver's behavior.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rt2870/2870_main_dev.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/staging/rt2870/2870_main_dev.c b/drivers/staging/rt2870/2870_main_dev.c index 9b8ec40..29b4ef3 100644 --- a/drivers/staging/rt2870/2870_main_dev.c +++ b/drivers/staging/rt2870/2870_main_dev.c @@ -1063,6 +1063,26 @@ VOID RT28xxThreadTerminate( } #endif #ifdef RT30xx + if (pid_nr(pObj->TimerQThr_pid) > 0) + { + POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie; + printk("Terminate the TimerQThr_pid=%d!\n", pid_nr(pObj->TimerQThr_pid)); + mb(); + pAd->TimerFunc_kill = 1; + mb(); + ret = kill_pid(pObj->TimerQThr_pid, SIGTERM, 1); + if (ret) + { + printk(KERN_WARNING "%s: unable to stop TimerQThread, pid=%d, ret=%d!\n", + pAd->net_dev->name, pid_nr(pObj->TimerQThr_pid), ret); + } + else + { + wait_for_completion(&pAd->TimerQComplete); + pObj->TimerQThr_pid = NULL; + } + } + if (pid_nr(pObj->MLMEThr_pid) > 0) { printk("Terminate the MLMEThr_pid=%d!\n", pid_nr(pObj->MLMEThr_pid)); @@ -1106,26 +1126,6 @@ VOID RT28xxThreadTerminate( pObj->RTUSBCmdThr_pid = NULL; } } - if (pid_nr(pObj->TimerQThr_pid) > 0) - { - POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie; - printk("Terminate the TimerQThr_pid=%d!\n", pid_nr(pObj->TimerQThr_pid)); - mb(); - pAd->TimerFunc_kill = 1; - mb(); - ret = kill_pid(pObj->TimerQThr_pid, SIGTERM, 1); - if (ret) - { - printk(KERN_WARNING "%s: unable to stop TimerQThread, pid=%d, ret=%d!\n", - pAd->net_dev->name, pid_nr(pObj->TimerQThr_pid), ret); - } - else - { - printk("wait_for_completion TimerQThr\n"); - wait_for_completion(&pAd->TimerQComplete); - pObj->TimerQThr_pid = NULL; - } - } #endif // Kill tasklets |