aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/rt2870/rt2870.h
diff options
context:
space:
mode:
authorPeter Teoh <htmldeveloper@gmail.com>2009-03-21 02:20:23 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:31 -0700
commitd44ca7af9e79abf4e80514583734cffed1117ee1 (patch)
tree8d4bf6b25c63f892074f086f0aacf5034fdfe831 /drivers/staging/rt2870/rt2870.h
parenta955dc39c0dd14e7f85c3d288478294fa133ea90 (diff)
Staging: rt2870: Removal of kernel_thread() API
Replacing the use of kernel_thread() with kthread_run(). But as kthread_run() returned a task structure, as compared with kernel_thread() returning a PID, it was found to be more efficient to store the task structure pointer as a field data instead of PID pointer. On top of modifying the field to store task structure pointer, the initialization of the field (assigned to THREAD_PID_INIT_VALUE) was also found unnecessary - as no where it is found to be used. Signed-off-by: Peter Teoh <htmldeveloper@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2870/rt2870.h')
-rw-r--r--drivers/staging/rt2870/rt2870.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rt2870/rt2870.h b/drivers/staging/rt2870/rt2870.h
index b8ccc50bbda..5dd15aac9ce 100644
--- a/drivers/staging/rt2870/rt2870.h
+++ b/drivers/staging/rt2870/rt2870.h
@@ -577,14 +577,16 @@ VOID RTUSBBulkRxComplete(purbb_t pUrb, struct pt_regs *pt_regs);
#define RTUSBMlmeUp(pAd) \
{ \
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \
- CHECK_PID_LEGALITY(pObj->MLMEThr_pid) \
+ BUG_ON(pObj->MLMEThr_task == NULL); \
+ CHECK_PID_LEGALITY(task_pid(pObj->MLMEThr_task)) \
up(&(pAd->mlme_semaphore)); \
}
#define RTUSBCMDUp(pAd) \
{ \
POS_COOKIE pObj = (POS_COOKIE) pAd->OS_Cookie; \
- CHECK_PID_LEGALITY(pObj->RTUSBCmdThr_pid) \
+ BUG_ON(pObj->RTUSBCmdThr_task == NULL); \
+ CHECK_PID_LEGALITY(task_pid(pObj->RTUSBCmdThr_task)) \
up(&(pAd->RTUSBCmd_semaphore)); \
}