staging: r8188eu: remove GetHwReg8188EU()
authorMichael Straube <straube.linux@gmail.com>
Thu, 31 Mar 2022 13:05:22 +0000 (15:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:48 +0000 (07:33 +0200)
The only call to GetHwReg8188EU() that is left over from previous
cleanups sets a variable that is immediately overwritten. This call
is useless and we can finally remove the GetHwReg8188EU() function.
This is part of the ongoing effort to get rid of the unwanted hal
layer.

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

index 37c5669..6b4b0b0 100644 (file)
@@ -1283,21 +1283,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 
 }
 
-void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
-{
-       struct hal_data_8188e *haldata = &Adapter->haldata;
-       struct odm_dm_struct *podmpriv = &haldata->odmpriv;
-
-       switch (variable) {
-       case HW_VAR_DM_FLAG:
-               val[0] = podmpriv->SupportAbility;
-               break;
-       default:
-               break;
-       }
-
-}
-
 /* Query setting of specified variable. */
 void GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue)
 {
index 0033a0a..9b46500 100644 (file)
@@ -66,7 +66,6 @@ void GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariab
 unsigned int rtl8188eu_inirp_init(struct adapter *Adapter);
 
 void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val);
-void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val);
 
 uint rtw_hal_init(struct adapter *padapter);
 uint rtw_hal_deinit(struct adapter *padapter);
index 7df2138..6383b39 100644 (file)
@@ -3620,9 +3620,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        break;
                case 0x06:
                        {
-                               u32     ODMFlag;
-                               GetHwReg8188EU(padapter, HW_VAR_DM_FLAG, (u8 *)(&ODMFlag));
-                               ODMFlag = (u32)(0x0f & arg);
+                               u32 ODMFlag = (u32)(0x0f & arg);
                                SetHwReg8188EU(padapter, HW_VAR_DM_FLAG, (u8 *)(&ODMFlag));
                        }
                        break;