staging: r8188eu: remove c2h_evt_clear()
authorMichael Straube <straube.linux@gmail.com>
Sun, 30 Jan 2022 11:12:17 +0000 (12:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jan 2022 13:00:47 +0000 (14:00 +0100)
Function c2h_evt_clear() is just a wrapper around rtw_write8().
Remove c2h_evt_clear() and call rtw_write8() directly.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220130111219.6390-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_cmd.c
drivers/staging/r8188eu/hal/hal_com.c
drivers/staging/r8188eu/include/hal_com.h

index 266bb7db5252c1deda1cd97a84a27c053f159351..c7e8602d2097ff15470158f48c50fd960a616f37 100644 (file)
@@ -1331,7 +1331,7 @@ static void c2h_wk_callback(struct work_struct *work)
        while (!rtw_cbuf_empty(evtpriv->c2h_queue)) {
                if ((c2h_evt = (struct c2h_evt_hdr *)rtw_cbuf_pop(evtpriv->c2h_queue)) != NULL) {
                        /* This C2H event is read, clear it */
-                       c2h_evt_clear(adapter);
+                       rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
                } else {
                        c2h_evt = kmalloc(16, GFP_KERNEL);
                        if (c2h_evt) {
index 7f28fd08f0aa0b44dd4f18acc3201f8d6fab67c1..f83375a389f804f28a355009b1ce9da3cf030266 100644 (file)
@@ -298,11 +298,6 @@ void hal_init_macaddr(struct adapter *adapter)
 * BITS  [127:120]      [119:16]      [15:8]              [7:4]            [3:0]
 */
 
-void c2h_evt_clear(struct adapter *adapter)
-{
-       rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
-}
-
 s32 c2h_evt_read(struct adapter *adapter, u8 *buf)
 {
        s32 ret = _FAIL;
@@ -340,7 +335,7 @@ clear_evt:
        * If this field isn't clear, the FW won't update the next
        * command message.
        */
-       c2h_evt_clear(adapter);
+       rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
 exit:
        return ret;
 }
index 95167f0b327f20f2c3a813cc32df18894ca799c1..4417054c0f939d5a3d7ea34e4007f2c0b6a22d06 100644 (file)
@@ -150,7 +150,6 @@ bool Hal_MappingOutPipe(struct adapter *pAdapter, u8 NumOutPipe);
 
 void hal_init_macaddr(struct adapter *adapter);
 
-void c2h_evt_clear(struct adapter *adapter);
 s32 c2h_evt_read(struct adapter *adapter, u8 *buf);
 
 #endif /* __HAL_COMMON_H__ */