[PATCH 5/9] staging: ft1000: Fix coding style in ft1000_read/write_dpram32 functions.

From: Marek Belisko
Date: Wed Feb 09 2011 - 09:03:50 EST


Signed-off-by: Marek Belisko <marek.belisko@xxxxxxxxxxxxxxx>
---
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 67 +++++++++++-------------
1 files changed, 31 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 9b98265..be07b42 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -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;
-
- //DEBUG("ft1000_read_dpram32: indx: %d cnt: %d\n", indx, cnt);
- ret =ft1000_control(ft1000dev,
- usb_rcvctrlpipe(ft1000dev->dev,0),
- HARLEY_READ_DPRAM_32, //request --READ_DPRAM_32
- HARLEY_READ_OPERATION, //requestType
- 0, //value
- indx, //index
- buffer, //data
- cnt, //data size
- LARGE_TIMEOUT ); //timeout
-
- //DEBUG("ft1000_read_dpram32: ret is %d \n", ret);
-
- //DEBUG("ft1000_read_dpram32: ret=%d \n", ret);
+ int ret = STATUS_SUCCESS;

- return ret;
+ ret = ft1000_control(ft1000dev,
+ usb_rcvctrlpipe(ft1000dev->dev, 0),
+ HARLEY_READ_DPRAM_32,
+ HARLEY_READ_OPERATION,
+ 0,
+ indx,
+ buffer,
+ cnt,
+ LARGE_TIMEOUT);

+ return ret;
}

//---------------------------------------------------------------------------
@@ -208,25 +203,25 @@ int ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer, u
// 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)
- cnt += cnt - (cnt % 4);
+ if (cnt % 4)
+ cnt += cnt - (cnt % 4);

- ret = ft1000_control(ft1000dev,
- usb_sndctrlpipe(ft1000dev->dev, 0),
- HARLEY_WRITE_DPRAM_32, //request -- WRITE_DPRAM_32
- HARLEY_WRITE_OPERATION, //requestType
- 0, //value
- indx, //index
- buffer, //buffer
- cnt, //buffer size
- LARGE_TIMEOUT );
+ ret = ft1000_control(ft1000dev,
+ usb_sndctrlpipe(ft1000dev->dev, 0),
+ HARLEY_WRITE_DPRAM_32,
+ HARLEY_WRITE_OPERATION,
+ 0,
+ indx,
+ buffer,
+ cnt,
+ LARGE_TIMEOUT);

- return ret;
+ return ret;
}

//---------------------------------------------------------------------------
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/