staging: ft1000: Fix coding style in ft1000_read/write_dpram32 functions.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Marek Belisko 2011-02-09 15:02:38 +01:00 committed by Greg Kroah-Hartman
parent 31da7c09de
commit e3fc923d4d
1 changed files with 28 additions and 33 deletions

View File

@ -169,27 +169,22 @@ int ft1000_write_register(struct ft1000_device *ft1000dev, u16 value,
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u16 cnt) int ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer,
u16 cnt)
{ {
int ret = STATUS_SUCCESS; int ret = STATUS_SUCCESS;
//DEBUG("ft1000_read_dpram32: indx: %d cnt: %d\n", indx, cnt); ret = ft1000_control(ft1000dev,
ret =ft1000_control(ft1000dev, usb_rcvctrlpipe(ft1000dev->dev, 0),
usb_rcvctrlpipe(ft1000dev->dev,0), HARLEY_READ_DPRAM_32,
HARLEY_READ_DPRAM_32, //request --READ_DPRAM_32 HARLEY_READ_OPERATION,
HARLEY_READ_OPERATION, //requestType 0,
0, //value indx,
indx, //index buffer,
buffer, //data cnt,
cnt, //data size LARGE_TIMEOUT);
LARGE_TIMEOUT ); //timeout
//DEBUG("ft1000_read_dpram32: ret is %d \n", ret);
//DEBUG("ft1000_read_dpram32: ret=%d \n", ret);
return ret;
return ret;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -208,25 +203,25 @@ int ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u
// Notes: // Notes:
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u16 cnt) int ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer,
u16 cnt)
{ {
int ret = STATUS_SUCCESS; int ret = STATUS_SUCCESS;
//DEBUG("ft1000_write_dpram32: indx: %d buffer: %x cnt: %d\n", indx, buffer, cnt); if (cnt % 4)
if ( cnt % 4) cnt += cnt - (cnt % 4);
cnt += cnt - (cnt % 4);
ret = ft1000_control(ft1000dev, ret = ft1000_control(ft1000dev,
usb_sndctrlpipe(ft1000dev->dev, 0), usb_sndctrlpipe(ft1000dev->dev, 0),
HARLEY_WRITE_DPRAM_32, //request -- WRITE_DPRAM_32 HARLEY_WRITE_DPRAM_32,
HARLEY_WRITE_OPERATION, //requestType HARLEY_WRITE_OPERATION,
0, //value 0,
indx, //index indx,
buffer, //buffer buffer,
cnt, //buffer size cnt,
LARGE_TIMEOUT ); LARGE_TIMEOUT);
return ret; return ret;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------