[PATCH 7/9] staging: brcm80211: remove kernel_thread() for wl_iscan_thread.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jason Cooper <jason@xxxxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index 041568e..ac09fd6 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -35,6 +35,7 @@
 #include <dhd.h>
 
 #include <linux/kernel.h>
+#include <linux/kthread.h>
 #include <linux/netdevice.h>
 #include <linux/sched.h>
 #include <linux/etherdevice.h>
@@ -2997,6 +2998,7 @@ static void wl_init_iscan_eloop(struct wl_iscan_eloop *el)
 static int32 wl_init_iscan(struct wl_priv *wl)
 {
 	struct wl_iscan_ctrl *iscan = wl_to_iscan(wl);
+	struct task_struct *tsk;
 	int err = 0;
 
 	if (wl->iscan_on) {
@@ -3009,8 +3011,9 @@ static int32 wl_init_iscan(struct wl_priv *wl)
 		iscan->timer.function = wl_iscan_timer;
 		sema_init(&iscan->sync, 0);
 		init_completion(&iscan->exited);
-		iscan->pid = kernel_thread(wl_iscan_thread, iscan, 0);
-		if (unlikely(iscan->pid < 0)) {
+		tsk = kthread_run(wl_iscan_thread, iscan, "wl_iscan");
+		iscan->pid = (long)get_pid(task_pid(tsk));
+		if (IS_ERR(tsk)) {
 			WL_ERR(("Could not create iscan thread\n"));
 			return -ENOMEM;
 		}
-- 
1.6.3.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux