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 <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-4-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vihas Makwana
2022-04-23 01:02:19 +05:30
committed by Greg Kroah-Hartman
parent 356eebb820
commit 8322ef200d

View File

@@ -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;
res = _rtw_init_evt_priv(pevtpriv);
/* 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;
}