From fc8ae7e548937bd95119b7bc0c1f0acb238a1535 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Sat, 26 Apr 2014 18:55:00 +0200 Subject: [PATCH] staging: rtl8723au: Fold _rtw_free_evt_priv23a() into rtw_free_evt_priv23a() Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_cmd.c | 34 ++++++------------- drivers/staging/rtl8723au/include/cmd_osdep.h | 1 - 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 0032e36adb16..d3b2ea1cd48b 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -230,26 +230,6 @@ int _rtw_init_evt_priv23a(struct evt_priv *pevtpriv) return res; } -void _rtw_free_evt_priv23a (struct evt_priv *pevtpriv) -{ - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, - ("+_rtw_free_evt_priv23a\n")); - cancel_work_sync(&pevtpriv->c2h_wk); - while(pevtpriv->c2h_wk_alive) - msleep(10); - - while (!rtw_cbuf_empty23a(pevtpriv->c2h_queue)) { - void *c2h; - if ((c2h = rtw_cbuf_pop23a(pevtpriv->c2h_queue)) != NULL && - c2h != (void *)pevtpriv) { - kfree(c2h); - } - } - - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, - ("-_rtw_free_evt_priv23a\n")); -} - u32 rtw_init_evt_priv23a(struct evt_priv *pevtpriv) { int res; @@ -261,9 +241,17 @@ u32 rtw_init_evt_priv23a(struct evt_priv *pevtpriv) void rtw_free_evt_priv23a(struct evt_priv *pevtpriv) { - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, - ("rtw_free_evt_priv23a\n")); - _rtw_free_evt_priv23a(pevtpriv); + cancel_work_sync(&pevtpriv->c2h_wk); + while (pevtpriv->c2h_wk_alive) + msleep(10); + + while (!rtw_cbuf_empty23a(pevtpriv->c2h_queue)) { + void *c2h; + if ((c2h = rtw_cbuf_pop23a(pevtpriv->c2h_queue)) != NULL && + c2h != (void *)pevtpriv) { + kfree(c2h); + } + } } void rtw_free_cmd_priv23a(struct cmd_priv *pcmdpriv) diff --git a/drivers/staging/rtl8723au/include/cmd_osdep.h b/drivers/staging/rtl8723au/include/cmd_osdep.h index 6d24e425afb2..fd7ac4d67dc9 100644 --- a/drivers/staging/rtl8723au/include/cmd_osdep.h +++ b/drivers/staging/rtl8723au/include/cmd_osdep.h @@ -19,7 +19,6 @@ #include int _rtw_init_evt_priv23a(struct evt_priv *pevtpriv); -void _rtw_free_evt_priv23a(struct evt_priv *pevtpriv); int _rtw_enqueue_cmd23a(struct rtw_queue *queue, struct cmd_obj *obj); #endif -- 2.30.2