staging: ft1000: Fix coding style in fix_ft1000_read_dpram32 function.
authorMarek Belisko <marek.belisko@open-nandra.com>
Wed, 9 Feb 2011 14:02:40 +0000 (15:02 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Feb 2011 22:55:51 +0000 (14:55 -0800)
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c

index aa4ad7b36b3f340b1a05bd608f4102681c97469a..6195ee90b9e3afab1aeeda46ddc2499dffd06af6 100644 (file)
@@ -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;
 }