staging: r8188eu: remove _cancel_timer wrapper
authorMartin Kaiser <martin@kaiser.cx>
Sat, 15 Jan 2022 16:55:31 +0000 (17:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:27:23 +0000 (16:27 +0100)
commit2bd4aa6acb115d6fd9225401e3cf38852f6ec7de
tree9084101b28883699aec7cb47c36fe5841f285205
parent9224cda4afc4e3700125a9eb883f4827fe15fe66
staging: r8188eu: remove _cancel_timer wrapper

Remove the _cancel_timer wrapper function and call del_timer_sync
directly.

None of the callers needs the bcancelled variable that's populated by
_cancel_timer, these variables can be removed in the calling functions.

rtw_surveydone_event_callback calls _cancel_timer only if it believes
that the timer is currently running. We can drop this. It's safe to
call del_timer_sync when the timer is not running. The timer in question,
scan_to_timer, is used only for the site survey command (the rtw_survey
functions) so we won't be stopping it while it's in use by someone else.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220115165536.231210-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_cmd.c
drivers/staging/r8188eu/core/rtw_mlme.c
drivers/staging/r8188eu/core/rtw_p2p.c
drivers/staging/r8188eu/include/osdep_service.h