aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/rt2870/common/rtusb_io.c
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/common/rtusb_io.c
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/common/rtusb_io.c')
-rw-r--r--drivers/staging/rt2870/common/rtusb_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
index 6db443e9268..afde136a9a0 100644
--- a/drivers/staging/rt2870/common/rtusb_io.c
+++ b/drivers/staging/rt2870/common/rtusb_io.c
@@ -958,7 +958,8 @@ NDIS_STATUS RTUSBEnqueueCmdFromNdis(
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))
return (NDIS_STATUS_RESOURCES);
status = RTMPAllocateMemory((PVOID *)&cmdqelmt, sizeof(CmdQElmt));