staging: rtl8188eu: Remove rtl8188e_EfuseGetCurrentSize()
authornavin patidar <navin.patidar@gmail.com>
Fri, 20 Jun 2014 14:59:10 +0000 (20:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2014 16:49:29 +0000 (09:49 -0700)
rtl8188e_EfuseGetCurrentSize() checks bool bPseudoTest and then calls suitable
function to get efuse size, hal_EfuseGetCurrentSize_8188e() also does same thing.
So use hal_EfuseGetCurrentSize_8188e() and drop rtl8188e_EfuseGetCurrentSize().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_efuse.c
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
drivers/staging/rtl8188eu/include/hal_intf.h
drivers/staging/rtl8188eu/include/rtw_efuse.h

index 31507e7a9b2482422e6adc447e5b594a3cc0d236..b4504585d27ab20c9b6b0ec0a3760ba4b7a636e6 100644 (file)
@@ -128,12 +128,11 @@ Efuse_PowerSwitch(
 u16
 Efuse_GetCurrentSize(
        struct adapter *pAdapter,
-       u8 efuseType,
        bool pseudo)
 {
        u16 ret = 0;
 
-       ret = pAdapter->HalFunc.EfuseGetCurrentSize(pAdapter, efuseType, pseudo);
+       ret = pAdapter->HalFunc.EfuseGetCurrentSize(pAdapter, pseudo);
 
        return ret;
 }
@@ -490,7 +489,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
 u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
 {
        Efuse_PowerSwitch(padapter, false, true);
-       *size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
+       *size = Efuse_GetCurrentSize(padapter, false);
        Efuse_PowerSwitch(padapter, false, false);
 
        return _SUCCESS;
index b7066cbd75f740b9fd9ddd17304ee235ce29efed..84393aaf68d56f92f301a19290b293ab41953d55 100644 (file)
@@ -1215,17 +1215,6 @@ static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudo
        return ret;
 }
 
-static u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest)
-{
-       u16     ret = 0;
-
-       if (bPseudoTest)
-               ret = Hal_EfuseGetCurrentSize_Pseudo(pAdapter, bPseudoTest);
-       else
-               ret = hal_EfuseGetCurrentSize_8188e(pAdapter, bPseudoTest);
-       return ret;
-}
-
 static int hal_EfusePgPacketRead_8188e(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
 {
        u8 ReadState = PG_STATE_HEADER;
@@ -1357,7 +1346,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
                        if (!PgWriteSuccess)
                                return false;
                        else
-                               efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest);
+                               efuse_addr = Efuse_GetCurrentSize(pAdapter, bPseudoTest);
                } else {
                        efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1;
                }
@@ -1646,7 +1635,7 @@ hal_EfusePgCheckAvailableAddr(
        /* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */
        EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
 
-       if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)
+       if (Efuse_GetCurrentSize(pAdapter, bPseudoTest) >= efuse_max_available_len)
                return false;
        return true;
 }
@@ -1836,7 +1825,7 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
        pHalFunc->EfusePowerSwitch = &rtl8188e_EfusePowerSwitch;
        pHalFunc->ReadEFuse = &ReadEFuseByIC;
        pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition;
-       pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
+       pHalFunc->EfuseGetCurrentSize = &hal_EfuseGetCurrentSize_8188e;
        pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
        pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
        pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
index ca29676d09df2ad281923400783a257bd0dc58df..ecc92a6a60c2d1fcb85dd905a671bb8f2dbfd663 100644 (file)
@@ -239,7 +239,7 @@ struct hal_ops {
                          u16 _size_byte, u8 *pbuf, bool bPseudoTest);
        void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
                                        u8 type, void *pOut, bool bPseudoTest);
-       u16     (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
+       u16     (*EfuseGetCurrentSize)(struct adapter *padapter,
                                       bool bPseudoTest);
        int     (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
                                      u8 *data, bool bPseudoTest);
index df51355e0f324c6533e3958430ba7879ef433fcf..cc19e191481bb928c03b728b6e4f892bcca20de2 100644 (file)
@@ -127,7 +127,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
                         u16 cnts, u8 *data);
 u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
                          u16 cnts, u8 *data);
-u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
+u16 Efuse_GetCurrentSize(struct adapter *adapter, bool test);
 u8 Efuse_CalculateWordCnts(u8 word_en);
 void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
 void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,