Commit f9ea02af authored by Daniel Kenji Toyama's avatar Daniel Kenji Toyama Committed by Greg Kroah-Hartman

Staging: vt6656: control.c: Fixed coding style issues

Replaced lots of spaces by real tabs and fixed some 80+ lines.
Signed-off-by: default avatarDaniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 69d5b491
...@@ -30,11 +30,13 @@ ...@@ -30,11 +30,13 @@
* CONTROLnsRequestIn - Read variable length bytes from MEM/BB/MAC/EEPROM * CONTROLnsRequestIn - Read variable length bytes from MEM/BB/MAC/EEPROM
* ControlvWriteByte - Write one byte to MEM/BB/MAC/EEPROM * ControlvWriteByte - Write one byte to MEM/BB/MAC/EEPROM
* ControlvReadByte - Read one byte from MEM/BB/MAC/EEPROM * ControlvReadByte - Read one byte from MEM/BB/MAC/EEPROM
* ControlvMaskByte - Read one byte from MEM/BB/MAC/EEPROM and clear/set some bits in the same address * ControlvMaskByte - Read one byte from MEM/BB/MAC/EEPROM and clear/set
* some bits in the same address
* *
* Revision History: * Revision History:
* 04-05-2004 Jerry Chen: Initial release * 04-05-2004 Jerry Chen: Initial release
* 11-24-2004 Warren Hsu: Add ControlvWriteByte,ControlvReadByte,ControlvMaskByte * 11-24-2004 Warren Hsu: Add ControlvWriteByte, ControlvReadByte,
* ControlvMaskByte
* *
*/ */
...@@ -42,8 +44,8 @@ ...@@ -42,8 +44,8 @@
#include "rndis.h" #include "rndis.h"
/*--------------------- Static Definitions -------------------------*/ /*--------------------- Static Definitions -------------------------*/
//static int msglevel =MSG_LEVEL_INFO; /* static int msglevel =MSG_LEVEL_INFO; */
//static int msglevel =MSG_LEVEL_DEBUG; /* static int msglevel =MSG_LEVEL_DEBUG; */
/*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Classes ----------------------------*/
/*--------------------- Static Variables --------------------------*/ /*--------------------- Static Variables --------------------------*/
...@@ -54,56 +56,43 @@ ...@@ -54,56 +56,43 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
void ControlvWriteByte(PSDevice pDevice, BYTE byRegType, BYTE byRegOfs,
void ControlvWriteByte(PSDevice pDevice, BYTE byRegType, BYTE byRegOfs, BYTE byData) BYTE byData)
{ {
BYTE byData1; BYTE byData1;
byData1 = byData;
byData1 = byData; CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE,
CONTROLnsRequestOut(pDevice, byRegOfs,
MESSAGE_TYPE_WRITE, byRegType,
byRegOfs, 1,
byRegType, &byData1);
1,
&byData1
);
} }
void ControlvReadByte(PSDevice pDevice, BYTE byRegType, BYTE byRegOfs,
void ControlvReadByte(PSDevice pDevice, BYTE byRegType, BYTE byRegOfs, PBYTE pbyData) PBYTE pbyData)
{ {
NTSTATUS ntStatus; NTSTATUS ntStatus;
BYTE byData1; BYTE byData1;
ntStatus = CONTROLnsRequestIn(pDevice,
MESSAGE_TYPE_READ,
ntStatus = CONTROLnsRequestIn(pDevice, byRegOfs,
MESSAGE_TYPE_READ, byRegType,
byRegOfs, 1,
byRegType, &byData1);
1, *pbyData = byData1;
&byData1);
*pbyData = byData1;
} }
void ControlvMaskByte(PSDevice pDevice, BYTE byRegType, BYTE byRegOfs,
BYTE byMask, BYTE byData)
void ControlvMaskByte(PSDevice pDevice, BYTE byRegType, BYTE byRegOfs, BYTE byMask, BYTE byData)
{ {
BYTE pbyData[2]; BYTE pbyData[2];
pbyData[0] = byData;
pbyData[0] = byData; pbyData[1] = byMask;
pbyData[1] = byMask; CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE_MASK,
CONTROLnsRequestOut(pDevice, byRegOfs,
MESSAGE_TYPE_WRITE_MASK, byRegType,
byRegOfs, 2,
byRegType, pbyData);
2,
pbyData
);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment