staging: rtl8188eu: use standard kthread handling
authorMartin Kaiser <martin@kaiser.cx>
Sat, 5 Jun 2021 16:58:57 +0000 (18:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jun 2021 12:20:05 +0000 (14:20 +0200)
commit56b02ba0d2ab065d8432c68991dc381330a0421b
treea78b4d1aec4f0711cc5ce0862a73d4f3d636d6b1
parent0e37b86d1fcaf2a5ed0f8e3b2e55c05818d9fc61
staging: rtl8188eu: use standard kthread handling

The driver defines its own completion to wait until the command thread
is stopped. Use kthread_stop instead and check kthread_should_stop in
the thread's main loop. (For now, we keep the driver's "emergency exit"
via bDriverStopped/bSurpriseRemoved.)

To check if the command thread is running, the driver stores the thread's
task_struct and a boolean status variable. Remove this status and check the
task_struct directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210605165858.3175-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/include/rtw_cmd.h
drivers/staging/rtl8188eu/os_dep/os_intfs.c