[PATCH 4/9] staging: brcm80211: remove kernel_thread() for dhd_dpc_thread.

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

 



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

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index 125ee43..e95e34d 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -2039,7 +2039,14 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
 		/* Initialize DPC thread */
 		sema_init(&dhd->dpc_sem, 0);
 		init_completion(&dhd->dpc_exited);
-		dhd->dpc_pid = kernel_thread(dhd_dpc_thread, dhd, 0);
+		tsk = kthread_run(dhd_dpc_thread, dhd, "dhd_dpc");
+		if (IS_ERR(tsk)) {
+			printk(KERN_WARNING
+				"dhd_dpc thread failed to start\n");
+			dhd->dpc_pid = -1;
+		} else {
+			dhd->dpc_pid = (long)get_pid(task_pid(tsk));
+		}
 	} else {
 		tasklet_init(&dhd->tasklet, dhd_dpc, (unsigned long) dhd);
 		dhd->dpc_pid = -1;
-- 
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