Commit 1999bd52 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: remove thread wrapper



The wilc_thread code is a very thin wrapper around kthread,
so just remove it and use kthread directly.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 544c69dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC

wilc1000-objs := wilc_wfi_netdevice.o wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
			wilc_memory.o wilc_msgqueue.o wilc_semaphore.o wilc_sleep.o wilc_strutils.o \
			wilc_thread.o wilc_time.o wilc_timer.o coreconfigurator.o host_interface.o \
			wilc_time.o wilc_timer.o coreconfigurator.o host_interface.o \
			fifo_buffer.o wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o

wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o
+7 −9
Original line number Diff line number Diff line
@@ -543,7 +543,7 @@ tstrWILC_WFIDrv *gWFiDrvHandle = WILC_NULL;
WILC_Bool g_obtainingIP = WILC_FALSE;
#endif
WILC_Uint8 P2P_LISTEN_STATE;
static WILC_ThreadHandle HostIFthreadHandler;
static struct task_struct *HostIFthreadHandler;
static WILC_MsgQueueHandle gMsgQHostIF;
static WILC_SemaphoreHandle hSemHostIFthrdEnd;

@@ -4370,7 +4370,7 @@ static WILC_Sint32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessi
 *  @date
 *  @version	1.0
 */
static void hostIFthread(void *pvArg)
static int hostIFthread(void *pvArg)
{
	WILC_Uint32 u32Ret;
	tstrHostIFmsg strHostIFmsg;
@@ -4591,10 +4591,7 @@ static void hostIFthread(void *pvArg)

	PRINT_D(HOSTINF_DBG, "Releasing thread exit semaphore\n");
	WILC_SemaphoreRelease(&hSemHostIFthrdEnd, WILC_NULL);
	return;
	/* do_exit(error); */
	/* PRINT_D(HOSTINF_DBG,"do_exit error code %d\n",error); */

	return 0;
}

static void TimerCB_Scan(void *pvArg)
@@ -6683,9 +6680,10 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv)
			goto _fail_;
		}
		msgQ_created = 1;
		s32Error = WILC_ThreadCreate(&HostIFthreadHandler, hostIFthread, WILC_NULL, WILC_NULL);
		if (s32Error < 0) {
		HostIFthreadHandler = kthread_run(hostIFthread, NULL, "WILC_kthread");
		if (IS_ERR(HostIFthreadHandler)) {
			PRINT_ER("Failed to creat Thread\n");
			s32Error = WILC_FAIL;
			goto _fail_mq_;
		}
		s32Error = WILC_TimerCreate(&(g_hPeriodicRSSI), GetPeriodicRSSI, WILC_NULL);
@@ -6788,7 +6786,7 @@ WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv)
_fail_timer_1:
	WILC_TimerDestroy(&(pstrWFIDrv->hScanTimer), WILC_NULL);
_fail_thread_:
	WILC_ThreadDestroy(&HostIFthreadHandler, WILC_NULL);
	kthread_stop(HostIFthreadHandler);
_fail_mq_:
	WILC_MsgQueueDestroy(&gMsgQHostIF, WILC_NULL);
_fail_:
+0 −3
Original line number Diff line number Diff line
@@ -10,9 +10,6 @@

/* OS features supported */

#define CONFIG_WILC_THREAD_FEATURE 1
/* #define CONFIG_WILC_THREAD_SUSPEND_CONTROL 1 */
/* #define CONFIG_WILC_THREAD_STRICT_PRIORITY 1 */
#define CONFIG_WILC_SEMAPHORE_FEATURE 1
/* #define CONFIG_WILC_SEMAPHORE_TIMEOUT 1 */
#define CONFIG_WILC_SLEEP_FEATURE 1
+0 −5
Original line number Diff line number Diff line
@@ -54,11 +54,6 @@ typedef WILC_Uint16 WILC_WideChar;
/* Error reporting and handling support */
#include "wilc_errorsupport.h"

/* Thread support */
#ifdef CONFIG_WILC_THREAD_FEATURE
#include "wilc_thread.h"
#endif

/* Semaphore support */
#ifdef CONFIG_WILC_SEMAPHORE_FEATURE
#include "wilc_semaphore.h"
+0 −14
Original line number Diff line number Diff line
@@ -15,18 +15,6 @@
 *      Feature support checks
 *******************************************************************/

/* CONFIG_WILC_THREAD_FEATURE is implemented */

/* remove the following block when implementing its feature */
#ifdef CONFIG_WILC_THREAD_SUSPEND_CONTROL
#error This feature is not supported by this OS
#endif

/* remove the following block when implementing its feature */
#ifdef CONFIG_WILC_THREAD_STRICT_PRIORITY
#error This feature is not supported by this OS
#endif

/* CONFIG_WILC_SEMAPHORE_FEATURE is implemented */

/* remove the following block when implementing its feature
@@ -140,8 +128,6 @@
 *      OS specific types
 *******************************************************************/

typedef struct task_struct *WILC_ThreadHandle;

typedef void *WILC_MemoryPoolHandle;
typedef struct semaphore WILC_SemaphoreHandle;

Loading