[PATCH] kthread: airo.c
authorSukadev Bhattiprolu <sukadev@us.ibm.com>
Tue, 15 Aug 2006 06:12:03 +0000 (23:12 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 29 Aug 2006 21:06:28 +0000 (17:06 -0400)
commit3b4c7d640376dbccfe80fc4f7b8772ecc7de28c5
treed32851f791af1f1c448cf1d07a941638abe3b3a7
parente4ac2663ea27d5dda88d97d117080995fcfcd6d5
[PATCH] kthread: airo.c

The airo driver is currently caching a pid for later use, but with the
implementation of containers, pids themselves do not uniquely identify a
task.  The driver is also using kernel_thread() which is deprecated in
drivers.

This patch essentially replaces the kernel_thread() with kthread_create().
It also stores the task_struct of the airo_thread rather than its pid.
Since this introduces a second task_struct in struct airo_info, the patch
renames airo_info.task to airo_info.list_bss_task.

As an extension of these changes, the patch further:

 - replaces kill_proc() with kthread_stop()
 - replaces signal_pending() with kthread_should_stop()
 - removes thread completion synchronisation which is handled by
   kthread_stop().

[akpm@osdl.org: fix races]
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Javier Achirica <achirica@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/airo.c