diff --git a/drivers/staging/keucr/smilmain.c b/drivers/staging/keucr/smilmain.c index afeb8f86152f1fc8e8127a672c20b426d050d404..03caa02e9dcb9ed2f9518da2d3f0f51717fe4a37 100644 --- a/drivers/staging/keucr/smilmain.c +++ b/drivers/staging/keucr/smilmain.c @@ -4,7 +4,7 @@ #include "smcommon.h" #include "smil.h" -int Check_D_LogCHS (WORD *,BYTE *,BYTE *); +int Check_D_LogCHS (WORD *, BYTE *, BYTE *); void Initialize_D_Media (void); void PowerOff_D_Media (void); int Check_D_MediaPower (void); @@ -61,10 +61,10 @@ DWORD MediaChange; static DWORD SectCopyMode; //BIT Control Macro -static BYTE BitData[] = { 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 } ; -#define Set_D_Bit(a,b) (a[(BYTE)((b)/8)]|= BitData[(b)%8]) -#define Clr_D_Bit(a,b) (a[(BYTE)((b)/8)]&=~BitData[(b)%8]) -#define Chk_D_Bit(a,b) (a[(BYTE)((b)/8)] & BitData[(b)%8]) +static BYTE BitData[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 } ; +#define Set_D_Bit(a, b) (a[(BYTE)((b)/8)]|= BitData[(b)%8]) +#define Clr_D_Bit(a, b) (a[(BYTE)((b)/8)]&=~BitData[(b)%8]) +#define Chk_D_Bit(a, b) (a[(BYTE)((b)/8)] & BitData[(b)%8]) //extern PBYTE SMHostAddr; BYTE IsSSFDCCompliance; @@ -142,7 +142,7 @@ int SM_FreeMem(void) //SmartMedia Read/Write/Erase Function //----- Media_D_ReadSector() ------------------------------------------- -int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf) +int Media_D_ReadSector(struct us_data *us, DWORD start, WORD count, BYTE *buf) { WORD len, bn; @@ -182,7 +182,7 @@ int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf) } // here //----- Media_D_CopySector() ------------------------------------------ -int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf) +int Media_D_CopySector(struct us_data *us, DWORD start, WORD count, BYTE *buf) { //DWORD mode; //int i; @@ -205,7 +205,7 @@ int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf) bn = count; //if (Ssfdc_D_CopyBlock(fdoExt,count,buf,Redundant)) - if (Ssfdc_D_CopyBlock(us,bn,buf,Redundant)) { + if (Ssfdc_D_CopyBlock(us, bn, buf, Redundant)) { ErrCode = ERR_WriteFault; return ErrCode; } @@ -246,7 +246,7 @@ int Release_D_CopySector(struct us_data *us) return SMSUCCESS; } - Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock); + Clr_D_Bit(Assign[Media.Zone], Media.PhyBlock); Media.PhyBlock=WriteBlock; return SMSUCCESS; @@ -1209,8 +1209,8 @@ int Assign_D_WriteBlock(void) ReadBlock=Media.PhyBlock; for(WriteBlock=AssignStart[Media.Zone]; WriteBlockpusb_dev->descriptor.bcdDevice); memcpy(data+8, us->unusual_dev->vendorName,