staging: r8188eu: remove InitSwLeds from hal_ops
authorMichael Straube <straube.linux@gmail.com>
Mon, 6 Sep 2021 19:01:44 +0000 (21:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:49 +0000 (08:49 +0200)
Remove InitSwLeds from hal_ops and remove its wrapper
rtw_hal_sw_led_init(). Call rtl8188eu_InitSwLeds() directly instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210906190223.11396-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/hal_intf.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_intf.h
drivers/staging/r8188eu/os_dep/ioctl_linux.c
drivers/staging/r8188eu/os_dep/os_intfs.c

index e91db4f5886b63c3730253eb31963cd496015489..1848a7246d6d3d65601b5d28758c2254ece129b6 100644 (file)
@@ -25,12 +25,6 @@ void rtw_hal_dm_deinit(struct adapter *adapt)
                adapt->HalFunc.dm_deinit(adapt);
 }
 
-void rtw_hal_sw_led_init(struct adapter *adapt)
-{
-       if (adapt->HalFunc.InitSwLeds)
-               adapt->HalFunc.InitSwLeds(adapt);
-}
-
 void rtw_hal_sw_led_deinit(struct adapter *adapt)
 {
        if (adapt->HalFunc.DeInitSwLeds)
index 679f9f6e6dbe74f992a85d66974115abd1cd151e..86080d502636a4c427260e1b4cea048e64100001 100644 (file)
@@ -2246,7 +2246,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 
        halfunc->init_recv_priv = &rtl8188eu_init_recv_priv;
        halfunc->free_recv_priv = &rtl8188eu_free_recv_priv;
-       halfunc->InitSwLeds = &rtl8188eu_InitSwLeds;
        halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
 
        halfunc->SetHwRegHandler = &SetHwReg8188EU;
index 16d59d24d1b87a9074afa31810a5c2252a3f6a37..e240d5b2406f77cef3fc3c8fffc918bf25e6b2e0 100644 (file)
@@ -143,7 +143,6 @@ struct hal_ops {
        s32     (*init_recv_priv)(struct adapter *padapter);
        void    (*free_recv_priv)(struct adapter *padapter);
 
-       void    (*InitSwLeds)(struct adapter *padapter);
        void    (*DeInitSwLeds)(struct adapter *padapter);
 
        void    (*dm_init)(struct adapter *padapter);
@@ -256,7 +255,6 @@ void        rtw_hal_free_data(struct adapter *padapter);
 
 void rtw_hal_dm_init(struct adapter *padapter);
 void rtw_hal_dm_deinit(struct adapter *padapter);
-void rtw_hal_sw_led_init(struct adapter *padapter);
 void rtw_hal_sw_led_deinit(struct adapter *padapter);
 
 u32 rtw_hal_power_on(struct adapter *padapter);
index bd637a66729926a7b961d76148ac2f1fdc8d3d60..7c18b0adf740e2124a4ef73d077420ffc4f300b2 100644 (file)
@@ -15,6 +15,7 @@
 #include "../include/rtw_mp_ioctl.h"
 #include "../include/usb_ops.h"
 #include "../include/rtl8188e_hal.h"
+#include "../include/rtl8188e_led.h"
 
 #include "../include/rtw_mp.h"
 #include "../include/rtw_iol.h"
@@ -3845,7 +3846,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
 
        if (!memcmp(rereg_priv->old_ifname, "disable%d", 9)) {
                padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed;
-               rtw_hal_sw_led_init(padapter);
+               rtl8188eu_InitSwLeds(padapter);
                rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode);
        }
 
index 352d7320cfa940e8d2f5e392408ef63713736987..aa6d0574bd30e18892a4fc09da968fb39518b2d5 100644 (file)
@@ -9,9 +9,9 @@
 #include "../include/recv_osdep.h"
 #include "../include/hal_intf.h"
 #include "../include/rtw_ioctl.h"
-
 #include "../include/usb_osintf.h"
 #include "../include/rtw_br_ext.h"
+#include "../include/rtl8188e_led.h"
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
@@ -887,7 +887,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
        ret8 = rtw_init_default_value(padapter);
 
        rtw_hal_dm_init(padapter);
-       rtw_hal_sw_led_init(padapter);
+       rtl8188eu_InitSwLeds(padapter);
 
        rtw_hal_sreset_init(padapter);