diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-10-29 20:10:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:51:45 -0800 |
commit | fc68c7efea279b066bd5f7cc7413099a6b22bbec (patch) | |
tree | 1522a4c9a9543bb2604c536bab39b69e6df1fdb1 /drivers/staging/winbond | |
parent | 44e8541c5e14b40a773e830df339eddbcd0cb7ec (diff) |
Staging: w35und: remove memcpy/memcmp wrappers
The OS_MEMORY_CLEAR macro is not used so remove it. Also convert the one
call-site that uses OS_MEMORY_COMPARE to use memcmp() directly and remove the
wrapper macro.
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/winbond')
-rw-r--r-- | drivers/staging/winbond/linux/common.h | 3 | ||||
-rw-r--r-- | drivers/staging/winbond/wblinux.c | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/staging/winbond/linux/common.h b/drivers/staging/winbond/linux/common.h index 925e1b6cbc4f..046dab6b7bff 100644 --- a/drivers/staging/winbond/linux/common.h +++ b/drivers/staging/winbond/linux/common.h @@ -73,8 +73,5 @@ #define OS_EVENT_INDICATE( _A, _B, _F ) #define OS_PMKID_STATUS_EVENT( _A ) -#define OS_MEMORY_CLEAR( _A, _S ) memset( (u8 *)_A,0,_S) -#define OS_MEMORY_COMPARE( _A, _B, _S ) (memcmp(_A,_B,_S)? 0 : 1) // Definition is reverse with Ndis 1: the same 0: different - #endif // COMMON_DEF diff --git a/drivers/staging/winbond/wblinux.c b/drivers/staging/winbond/wblinux.c index 87b9970883d8..a662dde8e411 100644 --- a/drivers/staging/winbond/wblinux.c +++ b/drivers/staging/winbond/wblinux.c @@ -181,12 +181,11 @@ WbWLanInitialize(struct wb35_adapter *adapter) pMacAddr = adapter->sLocalPara.ThisMacAddress; pMacAddr2 = adapter->sLocalPara.PermanentAddress; hal_get_permanent_address( pHwData, adapter->sLocalPara.PermanentAddress );// Reading ethernet address from EEPROM - if (OS_MEMORY_COMPARE(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH )) // Is equal - { - memcpy( pMacAddr, pMacAddr2, MAC_ADDR_LENGTH ); - } else { + if (memcmp(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH) == 0) + memcpy(pMacAddr, pMacAddr2, MAC_ADDR_LENGTH); + else { // Set the user define MAC address - hal_set_ethernet_address( pHwData, adapter->sLocalPara.ThisMacAddress ); + hal_set_ethernet_address(pHwData, adapter->sLocalPara.ThisMacAddress); } //get current antenna |