aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVihas Makwana <[email protected]>2022-04-23 01:02:19 +0530
committerGreg Kroah-Hartman <[email protected]>2022-04-26 11:34:36 +0200
commit8322ef200da5ea1cdf3fca90d4b71084476d2ed4 (patch)
tree101625f7a13449706e41d493772506f664e0583b
parent356eebb820afbc0c14c43eb2dd254918e61697c6 (diff)
staging: r8188eu: drop unnecessary wrapper _rtw_init_evt_priv
Drop unnecessary wrapper _rtw_init_evt_priv and move its logic to rtw_init_evt_priv. Reviewed-by: Dan Carpenter <[email protected]> Signed-off-by: Vihas Makwana <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/r8188eu/core/rtw_cmd.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index 3d1fdc8525d7..3781706f709e 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -17,22 +17,6 @@
static void c2h_wk_callback(struct work_struct *work);
-static int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
-{
- int res = _SUCCESS;
-
- /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
- atomic_set(&pevtpriv->event_seq, 0);
-
- INIT_WORK(&pevtpriv->c2h_wk, c2h_wk_callback);
- pevtpriv->c2h_wk_alive = false;
- pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
- if (!pevtpriv->c2h_queue)
- res = _FAIL;
-
- return res;
-}
-
void rtw_free_evt_priv(struct evt_priv *pevtpriv)
{
cancel_work_sync(&pevtpriv->c2h_wk);
@@ -133,9 +117,16 @@ exit:
u32 rtw_init_evt_priv(struct evt_priv *pevtpriv)
{
- int res;
+ u32 res = _SUCCESS;
+
+ /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
+ atomic_set(&pevtpriv->event_seq, 0);
- res = _rtw_init_evt_priv(pevtpriv);
+ INIT_WORK(&pevtpriv->c2h_wk, c2h_wk_callback);
+ pevtpriv->c2h_wk_alive = false;
+ pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN + 1);
+ if (!pevtpriv->c2h_queue)
+ res = _FAIL;
return res;
}