summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ft1000
diff options
context:
space:
mode:
authorMarek Belisko <marek.belisko@open-nandra.com>2011-02-09 15:02:40 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-09 14:55:51 -0800
commit71e3335d5593b202ad266b828927efe1b88d88d2 (patch)
tree2234c64bfd65a01907c5deb4a1eb5dec66e3808f /drivers/staging/ft1000
parent460bd5ddabe5ff4474292864097a7b527cdd0e9c (diff)
staging: ft1000: Fix coding style in fix_ft1000_read_dpram32 function.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ft1000')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_hw.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index aa4ad7b36b3..6195ee90b9e 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -319,36 +319,31 @@ int ft1000_write_dpram16(struct ft1000_device *ft1000dev, u16 indx, u16 value, u
// Notes:
//
//---------------------------------------------------------------------------
-int fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buffer)
+int fix_ft1000_read_dpram32(struct ft1000_device *ft1000dev, u16 indx,
+ u8 *buffer)
{
- u8 buf[16];
- u16 pos;
- int ret = STATUS_SUCCESS;
-
- //DEBUG("fix_ft1000_read_dpram32: indx: %d \n", indx);
- pos = (indx / 4)*4;
- ret = ft1000_read_dpram32(ft1000dev, pos, buf, 16);
- if (ret == STATUS_SUCCESS)
- {
- pos = (indx % 4)*4;
- *buffer++ = buf[pos++];
- *buffer++ = buf[pos++];
- *buffer++ = buf[pos++];
- *buffer++ = buf[pos++];
- }
- else
- {
- DEBUG("fix_ft1000_read_dpram32: DPRAM32 Read failed\n");
- *buffer++ = 0;
- *buffer++ = 0;
- *buffer++ = 0;
- *buffer++ = 0;
+ u8 buf[16];
+ u16 pos;
+ int ret = STATUS_SUCCESS;
- }
+ pos = (indx / 4) * 4;
+ ret = ft1000_read_dpram32(ft1000dev, pos, buf, 16);
- //DEBUG("fix_ft1000_read_dpram32: data is %x \n", *buffer);
- return ret;
+ if (ret == STATUS_SUCCESS) {
+ pos = (indx % 4) * 4;
+ *buffer++ = buf[pos++];
+ *buffer++ = buf[pos++];
+ *buffer++ = buf[pos++];
+ *buffer++ = buf[pos++];
+ } else {
+ DEBUG("fix_ft1000_read_dpram32: DPRAM32 Read failed\n");
+ *buffer++ = 0;
+ *buffer++ = 0;
+ *buffer++ = 0;
+ *buffer++ = 0;
+ }
+ return ret;
}