[PATCH 2/2] staging: keucr: use kernel byteorder functions

Jack Stone jwjstone at fastmail.fm
Thu Mar 3 07:58:59 UTC 2011


> @@ -455,10 +457,10 @@ int MS_LibProcessBootBlock(struct us_data *us, WORD PhyBlock, BYTE *PageData)
>  			}
>  
>  			idi = &((MemStickBootBlockCIS_IDI *)(PageBuffer + (EntryOffset % MS_BYTES_PER_PAGE)))->idi.idi;
> -			if (LittleEndianWORD(idi->wIDIgeneralConfiguration) != MS_IDI_GENERAL_CONF)
> +			if (le16_to_cpu(idi->wIDIgeneralConfiguration) != MS_IDI_GENERAL_CONF)
>  				goto exit;
>  
> -			us->MS_Lib.BytesPerSector = LittleEndianWORD(idi->wIDIbytesPerSector);
> +			us->MS_Lib.BytesPerSector = be16_to_cpu(idi->wIDIbytesPerSector);

Shouldn't this be le16_to_cpu?

>  			if (us->MS_Lib.BytesPerSector != MS_BYTES_PER_PAGE)
>  				goto exit;
>  		}

Thanks,

Jack



More information about the devel mailing list