Staging: rt2870: Removal of kernel_thread() API

Previous thread: Staging: rt2860: Remove dependency on CFLAG RT2860 by Linux Kernel Mailing List on Sunday, April 5, 2009 - 12:24 pm. (1 message)

Next thread: Staging: frontier: Make checkpatch.pl considerably happier with tranzport driver. by Linux Kernel Mailing List on Sunday, April 5, 2009 - 12:25 pm. (1 message)
From: Linux Kernel Mailing List
Date: Sunday, April 5, 2009 - 12:24 pm

Gitweb:     http://git.kernel.org/linus/d44ca7af9e79abf4e80514583734cffed1117ee1
Commit:     d44ca7af9e79abf4e80514583734cffed1117ee1
Parent:     a955dc39c0dd14e7f85c3d288478294fa133ea90
Author:     Peter Teoh <htmldeveloper@gmail.com>
AuthorDate: Sat Mar 21 02:20:23 2009 +0800
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Fri Apr 3 14:53:31 2009 -0700

    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>
---
 drivers/staging/rt2870/2870_main_dev.c         |   67 ++++++++----------------
 drivers/staging/rt2870/common/2870_rtmp_init.c |   35 +++++++------
 drivers/staging/rt2870/common/cmm_data.c       |    3 -
 drivers/staging/rt2870/common/rtmp_init.c      |    2 +-
 drivers/staging/rt2870/common/rtusb_io.c       |    3 +-
 drivers/staging/rt2870/rt2870.h                |    6 ++-
 drivers/staging/rt2870/rt_linux.h              |   11 ++--
 7 files changed, 53 insertions(+), 74 deletions(-)

diff --git a/drivers/staging/rt2870/2870_main_dev.c b/drivers/staging/rt2870/2870_main_dev.c
index 04c764d..9d59e31 100644
--- a/drivers/staging/rt2870/2870_main_dev.c
+++ b/drivers/staging/rt2870/2870_main_dev.c
@@ -265,7 +265,7 @@ INT MlmeThread(
 	 */
 	DBGPRINT(RT_DEBUG_TRACE,( "<---%s\n",__func__));
 
-	pObj->MLMEThr_pid = THREAD_PID_INIT_VALUE;
+	pObj->MLMEThr_task = NULL;
 
 	complete_and_exit (&pAd->mlmeComplete, 0);
 	return 0;
@@ -373,7 ...
Previous thread: Staging: rt2860: Remove dependency on CFLAG RT2860 by Linux Kernel Mailing List on Sunday, April 5, 2009 - 12:24 pm. (1 message)

Next thread: Staging: frontier: Make checkpatch.pl considerably happier with tranzport driver. by Linux Kernel Mailing List on Sunday, April 5, 2009 - 12:25 pm. (1 message)