Change names of some variables and functions to conform
to the kernel coding style.

Signed-off-by: Shreeya Patel <shreeya.patel23...@gmail.com>
---
 drivers/staging/rtl8723bs/hal/sdio_ops.c | 186 +++++++++++++++----------------
 1 file changed, 93 insertions(+), 93 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c 
b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index aa52c31..e72f80f 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -29,34 +29,34 @@
 /*  */
 static void HalSdioGetCmdAddr8723BSdio(
        struct adapter *padapter,
-       u8 DeviceID,
-       u32 Addr,
-       u32 *pCmdAddr
+       u8 device_id,
+       u32 addr,
+       u32 *pcmdaddr
 )
 {
-       switch (DeviceID) {
+       switch (device_id) {
        case SDIO_LOCAL_DEVICE_ID:
-               *pCmdAddr = ((SDIO_LOCAL_DEVICE_ID << 13) | (Addr & 
SDIO_LOCAL_MSK));
+               *pcmdaddr = ((SDIO_LOCAL_DEVICE_ID << 13) | (addr & 
SDIO_LOCAL_MSK));
                break;
 
        case WLAN_IOREG_DEVICE_ID:
-               *pCmdAddr = ((WLAN_IOREG_DEVICE_ID << 13) | (Addr & 
WLAN_IOREG_MSK));
+               *pcmdaddr = ((WLAN_IOREG_DEVICE_ID << 13) | (addr & 
WLAN_IOREG_MSK));
                break;
 
        case WLAN_TX_HIQ_DEVICE_ID:
-               *pCmdAddr = ((WLAN_TX_HIQ_DEVICE_ID << 13) | (Addr & 
WLAN_FIFO_MSK));
+               *pcmdaddr = ((WLAN_TX_HIQ_DEVICE_ID << 13) | (addr & 
WLAN_FIFO_MSK));
                break;
 
        case WLAN_TX_MIQ_DEVICE_ID:
-               *pCmdAddr = ((WLAN_TX_MIQ_DEVICE_ID << 13) | (Addr & 
WLAN_FIFO_MSK));
+               *pcmdaddr = ((WLAN_TX_MIQ_DEVICE_ID << 13) | (addr & 
WLAN_FIFO_MSK));
                break;
 
        case WLAN_TX_LOQ_DEVICE_ID:
-               *pCmdAddr = ((WLAN_TX_LOQ_DEVICE_ID << 13) | (Addr & 
WLAN_FIFO_MSK));
+               *pcmdaddr = ((WLAN_TX_LOQ_DEVICE_ID << 13) | (addr & 
WLAN_FIFO_MSK));
                break;
 
        case WLAN_RX0FF_DEVICE_ID:
-               *pCmdAddr = ((WLAN_RX0FF_DEVICE_ID << 13) | (Addr & 
WLAN_RX0FF_MSK));
+               *pcmdaddr = ((WLAN_RX0FF_DEVICE_ID << 13) | (addr & 
WLAN_RX0FF_MSK));
                break;
 
        default:
@@ -66,64 +66,64 @@ static void HalSdioGetCmdAddr8723BSdio(
 
 static u8 get_deviceid(u32 addr)
 {
-       u8 devideId;
-       u16 pseudoId;
+       u8 devide_id;
+       u16 pseudo_id;
 
 
-       pseudoId = (u16)(addr >> 16);
-       switch (pseudoId) {
+       pseudo_id = (u16)(addr >> 16);
+       switch (pseudo_id) {
        case 0x1025:
-               devideId = SDIO_LOCAL_DEVICE_ID;
+               devide_id = SDIO_LOCAL_DEVICE_ID;
                break;
 
        case 0x1026:
-               devideId = WLAN_IOREG_DEVICE_ID;
+               devide_id = WLAN_IOREG_DEVICE_ID;
                break;
 
 /*             case 0x1027: */
-/*                     devideId = SDIO_FIRMWARE_FIFO; */
+/*                     devide_id = SDIO_FIRMWARE_FIFO; */
 /*                     break; */
 
        case 0x1031:
-               devideId = WLAN_TX_HIQ_DEVICE_ID;
+               devide_id = WLAN_TX_HIQ_DEVICE_ID;
                break;
 
        case 0x1032:
-               devideId = WLAN_TX_MIQ_DEVICE_ID;
+               devide_id = WLAN_TX_MIQ_DEVICE_ID;
                break;
 
        case 0x1033:
-               devideId = WLAN_TX_LOQ_DEVICE_ID;
+               devide_id = WLAN_TX_LOQ_DEVICE_ID;
                break;
 
        case 0x1034:
-               devideId = WLAN_RX0FF_DEVICE_ID;
+               devide_id = WLAN_RX0FF_DEVICE_ID;
                break;
 
        default:
-/*                     devideId = (u8)((addr >> 13) & 0xF); */
-               devideId = WLAN_IOREG_DEVICE_ID;
+/*                     devide_id = (u8)((addr >> 13) & 0xF); */
+               devide_id = WLAN_IOREG_DEVICE_ID;
                break;
        }
 
-       return devideId;
+       return devide_id;
 }
 
 /*
  * Ref:
  *HalSdioGetCmdAddr8723BSdio()
  */
-static u32 _cvrt2ftaddr(const u32 addr, u8 *pdeviceId, u16 *poffset)
+static u32 _cvrt2ftaddr(const u32 addr, u8 *pdevice_id, u16 *poffset)
 {
-       u8 deviceId;
+       u8 device_id;
        u16 offset;
        u32 ftaddr;
 
 
-       deviceId = get_deviceid(addr);
+       device_id = get_deviceid(addr);
        offset = 0;
 
-       switch (deviceId) {
+       switch (device_id) {
        case SDIO_LOCAL_DEVICE_ID:
                offset = addr & SDIO_LOCAL_MSK;
                break;
@@ -140,14 +140,14 @@ static u32 _cvrt2ftaddr(const u32 addr, u8 *pdeviceId, 
u16 *poffset)
 
        case WLAN_IOREG_DEVICE_ID:
        default:
-               deviceId = WLAN_IOREG_DEVICE_ID;
+               device_id = WLAN_IOREG_DEVICE_ID;
                offset = addr & WLAN_IOREG_MSK;
                break;
        }
-       ftaddr = (deviceId << 13) | offset;
+       ftaddr = (device_id << 13) | offset;
 
-       if (pdeviceId)
-               *pdeviceId = deviceId;
+       if (pdevice_id)
+               *pdevice_id = device_id;
        if (poffset)
                *poffset = offset;
 
@@ -176,8 +176,8 @@ static u16 sdio_read16(struct intf_hdl *pintfhdl, u32 addr)
 static u32 sdio_read32(struct intf_hdl *pintfhdl, u32 addr)
 {
        struct adapter *padapter;
-       u8 bMacPwrCtrlOn;
-       u8 deviceId;
+       u8 macpwrctrlon;
+       u8 device_id;
        u16 offset;
        u32 ftaddr;
        u8 shift;
@@ -186,12 +186,12 @@ static u32 sdio_read32(struct intf_hdl *pintfhdl, u32 
addr)
        __le32 le_tmp;
 
        padapter = pintfhdl->padapter;
-       ftaddr = _cvrt2ftaddr(addr, &deviceId, &offset);
+       ftaddr = _cvrt2ftaddr(addr, &device_id, &offset);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
        if (
-               ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
-               (!bMacPwrCtrlOn) ||
+               ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
+               (!macpwrctrlon) ||
                (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode)
        ) {
                err = sd_cmd52_read(pintfhdl, ftaddr, 4, (u8 *)&le_tmp);
@@ -233,8 +233,8 @@ static u32 sdio_read32(struct intf_hdl *pintfhdl, u32 addr)
 static s32 sdio_readN(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pbuf)
 {
        struct adapter *padapter;
-       u8 bMacPwrCtrlOn;
-       u8 deviceId;
+       u8 macpwrctrlon;
+       u8 device_id;
        u16 offset;
        u32 ftaddr;
        u8 shift;
@@ -243,12 +243,12 @@ static s32 sdio_readN(struct intf_hdl *pintfhdl, u32 
addr, u32 cnt, u8 *pbuf)
        padapter = pintfhdl->padapter;
        err = 0;
 
-       ftaddr = _cvrt2ftaddr(addr, &deviceId, &offset);
+       ftaddr = _cvrt2ftaddr(addr, &device_id, &offset);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
        if (
-               ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
-               (!bMacPwrCtrlOn) ||
+               ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
+               (!macpwrctrlon) ||
                (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode)
        )
                return sd_cmd52_read(pintfhdl, ftaddr, cnt, pbuf);
@@ -299,8 +299,8 @@ static s32 sdio_write16(struct intf_hdl *pintfhdl, u32 
addr, u16 val)
 static s32 sdio_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
 {
        struct adapter *padapter;
-       u8 bMacPwrCtrlOn;
-       u8 deviceId;
+       u8 macpwrctrlon;
+       u8 device_id;
        u16 offset;
        u32 ftaddr;
        u8 shift;
@@ -310,12 +310,12 @@ static s32 sdio_write32(struct intf_hdl *pintfhdl, u32 
addr, u32 val)
        padapter = pintfhdl->padapter;
        err = 0;
 
-       ftaddr = _cvrt2ftaddr(addr, &deviceId, &offset);
+       ftaddr = _cvrt2ftaddr(addr, &device_id, &offset);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
        if (
-               ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
-               (!bMacPwrCtrlOn) ||
+               ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
+               (!macpwrctrlon) ||
                (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode)
        ) {
                le_tmp = cpu_to_le32(val);
@@ -337,8 +337,8 @@ static s32 sdio_write32(struct intf_hdl *pintfhdl, u32 
addr, u32 val)
 static s32 sdio_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pbuf)
 {
        struct adapter *padapter;
-       u8 bMacPwrCtrlOn;
-       u8 deviceId;
+       u8 macpwrctrlon;
+       u8 device_id;
        u16 offset;
        u32 ftaddr;
        u8 shift;
@@ -347,12 +347,12 @@ static s32 sdio_writeN(struct intf_hdl *pintfhdl, u32 
addr, u32 cnt, u8 *pbuf)
        padapter = pintfhdl->padapter;
        err = 0;
 
-       ftaddr = _cvrt2ftaddr(addr, &deviceId, &offset);
+       ftaddr = _cvrt2ftaddr(addr, &device_id, &offset);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
        if (
-               ((deviceId == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
-               (!bMacPwrCtrlOn) ||
+               ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
+               (!macpwrctrlon) ||
                (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode)
        )
                return sd_cmd52_write(pintfhdl, ftaddr, cnt, pbuf);
@@ -566,7 +566,7 @@ static s32 _sdio_local_read(
 )
 {
        struct intf_hdl *pintfhdl;
-       u8 bMacPwrCtrlOn;
+       u8 macpwrctrlon;
        s32 err;
        u8 *ptmpbuf;
        u32 n;
@@ -576,8 +576,8 @@ static s32 _sdio_local_read(
 
        HalSdioGetCmdAddr8723BSdio(padapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
-       if (!bMacPwrCtrlOn)
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
+       if (!macpwrctrlon)
                return _sd_cmd52_read(pintfhdl, addr, cnt, pbuf);
 
        n = RND4(cnt);
@@ -605,7 +605,7 @@ s32 sdio_local_read(
 )
 {
        struct intf_hdl *pintfhdl;
-       u8 bMacPwrCtrlOn;
+       u8 macpwrctrlon;
        s32 err;
        u8 *ptmpbuf;
        u32 n;
@@ -614,9 +614,9 @@ s32 sdio_local_read(
 
        HalSdioGetCmdAddr8723BSdio(padapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
        if (
-               (!bMacPwrCtrlOn) ||
+               (!macpwrctrlon) ||
                (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode)
        )
                return sd_cmd52_read(pintfhdl, addr, cnt, pbuf);
@@ -646,7 +646,7 @@ s32 sdio_local_write(
 )
 {
        struct intf_hdl *pintfhdl;
-       u8 bMacPwrCtrlOn;
+       u8 macpwrctrlon;
        s32 err;
        u8 *ptmpbuf;
 
@@ -660,9 +660,9 @@ s32 sdio_local_write(
 
        HalSdioGetCmdAddr8723BSdio(padapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
 
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
        if (
-               (!bMacPwrCtrlOn) ||
+               (!macpwrctrlon) ||
                (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode)
        )
                return sd_cmd52_write(pintfhdl, addr, cnt, pbuf);
@@ -705,14 +705,14 @@ static u16 SdioLocalCmd52Read2Byte(struct adapter 
*padapter, u32 addr)
 static u32 SdioLocalCmd53Read4Byte(struct adapter *padapter, u32 addr)
 {
 
-       u8 bMacPwrCtrlOn;
+       u8 macpwrctrlon;
        u32 val = 0;
        struct intf_hdl *pintfhdl = &padapter->iopriv.intf;
        __le32 le_tmp;
 
        HalSdioGetCmdAddr8723BSdio(padapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
-       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
-       if (!bMacPwrCtrlOn || adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) {
+       rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &macpwrctrlon);
+       if (!macpwrctrlon || adapter_to_pwrctl(padapter)->bFwCurrentInPSMode) {
                sd_cmd52_read(pintfhdl, addr, 4, (u8 *)&le_tmp);
                val = le32_to_cpu(le_tmp);
        } else {
@@ -778,13 +778,13 @@ static s32 ReadInterrupt8723BSdio(struct adapter 
*padapter, u32 *phisr)
 /*  */
 /*     Created by Roger, 2011.02.11. */
 /*  */
-void InitInterrupt8723BSdio(struct adapter *padapter)
+void initinterrupt8723bsdio(struct adapter *padapter)
 {
-       struct hal_com_data *pHalData;
+       struct hal_com_data *phaldata;
 
 
-       pHalData = GET_HAL_DATA(padapter);
-       pHalData->sdio_himr = (u32)(            \
+       phaldata = GET_HAL_DATA(padapter);
+       phaldata->sdio_himr = (u32)(            \
                                                                
SDIO_HIMR_RX_REQUEST_MSK                        |
                                                                
SDIO_HIMR_AVAL_MSK                                      |
 /*                                                             
SDIO_HIMR_TXERR_MSK                             | */
@@ -812,14 +812,14 @@ void InitInterrupt8723BSdio(struct adapter *padapter)
 /*  */
 /*     Created by Roger, 2011.08.03. */
 /*  */
-void InitSysInterrupt8723BSdio(struct adapter *padapter)
+void initsysinterrupt8723bsdio(struct adapter *padapter)
 {
-       struct hal_com_data *pHalData;
+       struct hal_com_data *phaldata;
 
 
-       pHalData = GET_HAL_DATA(padapter);
+       phaldata = GET_HAL_DATA(padapter);
 
-       pHalData->SysIntrMask = (               \
+       phaldata->SysIntrMask = (               \
 /*                                                     HSIMR_GPIO12_0_INT_EN   
                | */
 /*                                                     HSIMR_SPS_OCP_INT_EN    
                | */
 /*                                                     HSIMR_RON_INT_EN        
                        | */
@@ -838,9 +838,9 @@ void InitSysInterrupt8723BSdio(struct adapter *padapter)
 /*  */
 /*     Created by Roger, 2011.02.11. */
 /*  */
-void ClearInterrupt8723BSdio(struct adapter *padapter)
+void clearinterrupt8723bsdio(struct adapter *padapter)
 {
-       struct hal_com_data *pHalData;
+       struct hal_com_data *phaldata;
        u8 *clear;
 
        if (padapter->bSurpriseRemoved)
@@ -850,7 +850,7 @@ void ClearInterrupt8723BSdio(struct adapter *padapter)
        clear = rtw_zmalloc(4);
 
        /*  Clear corresponding HISR Content if needed */
-       *(__le32 *)clear = cpu_to_le32(pHalData->sdio_hisr & 
MASK_SDIO_HISR_CLEAR);
+       *(__le32 *)clear = cpu_to_le32(phaldata->sdio_hisr & 
MASK_SDIO_HISR_CLEAR);
        if (*(__le32 *)clear) {
                /*  Perform write one clear operation */
                sdio_local_write(padapter, SDIO_REG_HISR, 4, clear);
@@ -870,15 +870,15 @@ void ClearInterrupt8723BSdio(struct adapter *padapter)
 /*  */
 /*     Created by Roger, 2011.02.11. */
 /*  */
-void EnableInterrupt8723BSdio(struct adapter *padapter)
+void enable_interrupt8723bsdio(struct adapter *padapter)
 {
-       struct hal_com_data *pHalData;
+       struct hal_com_data *phaldata;
        __le32 himr;
        u32 tmp;
 
-       pHalData = GET_HAL_DATA(padapter);
+       phaldata = GET_HAL_DATA(padapter);
 
-       himr = cpu_to_le32(pHalData->sdio_himr);
+       himr = cpu_to_le32(phaldata->sdio_himr);
        sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8 *)&himr);
 
        RT_TRACE(
@@ -887,13 +887,13 @@ void EnableInterrupt8723BSdio(struct adapter *padapter)
                (
                        "%s: enable SDIO HIMR = 0x%08X\n",
                        __func__,
-                       pHalData->sdio_himr
+                       phaldata->sdio_himr
                )
        );
 
        /*  Update current system IMR settings */
        tmp = rtw_read32(padapter, REG_HSIMR);
-       rtw_write32(padapter, REG_HSIMR, tmp | pHalData->SysIntrMask);
+       rtw_write32(padapter, REG_HSIMR, tmp | phaldata->SysIntrMask);
 
        RT_TRACE(
                _module_hci_ops_c_,
@@ -901,7 +901,7 @@ void EnableInterrupt8723BSdio(struct adapter *padapter)
                (
                        "%s: enable HSIMR = 0x%08X\n",
                        __func__,
-                       pHalData->SysIntrMask
+                       phaldata->SysIntrMask
                )
        );
 
@@ -922,7 +922,7 @@ void EnableInterrupt8723BSdio(struct adapter *padapter)
 /*  */
 /*     Created by Roger, 2011.02.11. */
 /*  */
-void DisableInterrupt8723BSdio(struct adapter *padapter)
+void disable_interrupt8723bsdio(struct adapter *padapter)
 {
        __le32 himr;
 
@@ -1201,16 +1201,16 @@ void sd_int_hdl(struct adapter *padapter)
 u8 HalQueryTxBufferStatus8723BSdio(struct adapter *padapter)
 {
        struct hal_com_data *phal;
-       u32 NumOfFreePage;
-       /* _irqL irql; */
+       u32 numoffreepage;
+       /* _irql irql; */
 
 
        phal = GET_HAL_DATA(padapter);
 
-       NumOfFreePage = SdioLocalCmd53Read4Byte(padapter, SDIO_REG_FREE_TXPG);
+       numoffreepage = SdioLocalCmd53Read4Byte(padapter, SDIO_REG_FREE_TXPG);
 
        /* spin_lock_bh(&phal->SdioTxFIFOFreePageLock); */
-       memcpy(phal->SdioTxFIFOFreePage, &NumOfFreePage, 4);
+       memcpy(phal->SdioTxFIFOFreePage, &numoffreepage, 4);
        RT_TRACE(_module_hci_ops_c_, _drv_notice_,
                        ("%s: Free page for HIQ(%#x), MIDQ(%#x), LOWQ(%#x), 
PUBQ(%#x)\n",
                        __func__,
@@ -1229,9 +1229,9 @@ u8 HalQueryTxBufferStatus8723BSdio(struct adapter 
*padapter)
 /*  */
 u8 HalQueryTxOQTBufferStatus8723BSdio(struct adapter *padapter)
 {
-       struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
+       struct hal_com_data *phaldata = GET_HAL_DATA(padapter);
 
-       pHalData->SdioTxOQTFreeSpace = SdioLocalCmd52Read1Byte(padapter, 
SDIO_REG_OQT_FREE_PG);
+       phaldata->SdioTxOQTFreeSpace = SdioLocalCmd52Read1Byte(padapter, 
SDIO_REG_OQT_FREE_PG);
        return true;
 }
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to