staging: rtl8723au: Eliminate RTW_STATUS_CODE23a()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:04:00 +0000 (15:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:12:00 +0000 (13:12 -0700)
Inline the parsing of status codes. Long term we should pass back the
proper status codes and get rid of the ugly _FAIL/_SUCCESS mess. This
is one small step in that direction.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_io.c
drivers/staging/rtl8723au/include/osdep_service.h
drivers/staging/rtl8723au/os_dep/osdep_service.c

index 20680e0..cf6d30f 100644 (file)
@@ -72,7 +72,10 @@ int _rtw_write823a(struct rtw_adapter *adapter, u32 addr, u8 val)
 
        ret = io_ops->_write8(adapter, addr, val);
 
-       return RTW_STATUS_CODE23a(ret);
+       if (ret < 0)
+               return _FAIL;
+       else
+               return _SUCCESS;
 }
 
 int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
@@ -82,7 +85,10 @@ int _rtw_write1623a(struct rtw_adapter *adapter, u32 addr, u16 val)
 
        ret = io_ops->_write16(adapter, addr, val);
 
-       return RTW_STATUS_CODE23a(ret);
+       if (ret < 0)
+               return _FAIL;
+       else
+               return _SUCCESS;
 }
 
 int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
@@ -92,7 +98,10 @@ int _rtw_write3223a(struct rtw_adapter *adapter, u32 addr, u32 val)
 
        ret = io_ops->_write32(adapter, addr, val);
 
-       return RTW_STATUS_CODE23a(ret);
+       if (ret < 0)
+               return _FAIL;
+       else
+               return _SUCCESS;
 }
 
 int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdata)
@@ -102,7 +111,10 @@ int _rtw_writeN23a(struct rtw_adapter *adapter, u32 addr , u32 length , u8 *pdat
 
        ret = io_ops->_writeN(adapter, addr, length, pdata);
 
-       return RTW_STATUS_CODE23a(ret);
+       if (ret < 0)
+               return _FAIL;
+       else
+               return _SUCCESS;
 }
 void _rtw_read_mem23a(struct rtw_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {