[PATCH 2/2] staging: ft1000-usb: Removed global initialization

2015-06-17 Thread Peter Karlsson
Fix checkpatch error about initialize globals to 0.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index 7228e14..faac4e5 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -55,7 +55,7 @@ struct list_head freercvpool;
 /* lock to arbitrate free buffer list for receive command data */
 spinlock_t free_buff_lock;
 
-int numofmsgbuf = 0;
+int numofmsgbuf;
 
 /*
  * Table of entry-point routines for char device
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: ft1000-usb: Removed unnecessary parenthes

2015-06-17 Thread Peter Karlsson
Fix checkpatch warning about unnecessary parenthes.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index b9aa115..7228e14 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -317,7 +317,7 @@ static int ft1000_open(struct inode *inode, struct file 
*file)
 
/* Search for available application info block */
for (i = 0; i < MAX_NUM_APP; i++) {
-   if ((dev->app_info[i].fileobject == NULL))
+   if (dev->app_info[i].fileobject == NULL)
break;
}
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/2] staging: ft1000-usb: checkpatch fixes

2015-06-17 Thread Peter Karlsson
Fixes two checkpatch style issues.

Peter Karlsson (2):
  staging: ft1000-usb: Removed unnecessary parenthes.
  staging: ft1000-usb: Removed global initialization.

 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/5] staging: ft1000-usb: checkpatch fixes

2015-06-18 Thread Peter Karlsson
Fixed checkpatch style issues.

Peter Karlsson (5):
  staging: ft1000-usb: Fixed some issues with lines over 80 characters
  staging: ft1000-usb: Fixed some issues with lines over 80 characters
  staging: ft1000-usb: Fixed some issues with lines over 80 characters
  staging: ft1000-usb: Fixed some issues with lines over 80 characters
  staging: ft1000-usb: Removed CVS keyword marker.

 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c   | 55 ++
 .../staging/ft1000/ft1000-usb/ft1000_download.c| 41 
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c  | 15 +++---
 drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h   | 12 ++---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c |  2 -
 5 files changed, 70 insertions(+), 55 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters

2015-06-18 Thread Peter Karlsson
Fix checkpatch warnings about lines over 80 characters.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 55 +++-
 1 file changed, 35 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index faac4e5..5abafdc 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -6,12 +6,12 @@
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
any
- * later version. This program is distributed in the hope that it will be 
useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details. You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the GNU
+ * General Public License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place -
  * Suite 330, Boston, MA 02111-1307, USA.
  *---
@@ -103,9 +103,6 @@ struct dpram_blk *ft1000_get_buffer(struct list_head 
*bufflist)
return ptr;
 }
 
-
-
-
 /*
  *---
  * Function:ft1000_free_buffer
@@ -260,7 +257,9 @@ void ft1000_destroy_dev(struct net_device *netdev)
/* Make sure we free any memory reserve for slow Queue */
for (i = 0; i < MAX_NUM_APP; i++) {
while (list_empty(&dev->app_info[i].app_sqlist) == 0) {
-   pdpram_blk = 
list_entry(dev->app_info[i].app_sqlist.next, struct dpram_blk, list);
+   pdpram_blk = list_entry(
+   dev->app_info[i].app_sqlist.next,
+   struct dpram_blk, list);
list_del(&pdpram_blk->list);
ft1000_free_buffer(pdpram_blk, &freercvpool);
 
@@ -271,7 +270,8 @@ void ft1000_destroy_dev(struct net_device *netdev)
/* Remove buffer allocated for receive command data */
if (ft1000_flarion_cnt == 0) {
while (list_empty(&freercvpool) == 0) {
-   ptr = list_entry(freercvpool.next, struct 
dpram_blk, list);
+   ptr = list_entry(freercvpool.next,
+   struct dpram_blk, list);
list_del(&ptr->list);
kfree(ptr->pbuffer);
kfree(ptr);
@@ -414,12 +414,20 @@ static long ft1000_ioctl(struct file *file, unsigned int 
command,
unsigned long flags;
struct IOCTL_GET_VER get_ver_data;
struct IOCTL_GET_DSP_STAT get_stat_data;
-   u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64,
- 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, 
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00,
- 0x00, 0x01, 0x00, 0x00};
+   u8 ConnectionMsg[] = {
+   0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+   0x93, 0x64, 0x00, 0x00, 0x02, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
+   0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x02, 0x37, 0x00, 0x00,
+   0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00,
+  

[PATCH 2/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters

2015-06-18 Thread Peter Karlsson
Fix checkpatch warnings about lines over 80 characters.

Signed-off-by: Peter Karlsson 
---
 .../staging/ft1000/ft1000-usb/ft1000_download.c| 41 +++---
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 5def347..6e3f07b 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -82,29 +82,29 @@
 #define  DWNLD_MAG1_PS_HDR_LOC0x03
 
 struct dsp_file_hdr {
-   long  version_id;  /* Version ID of this image 
format. */
-   long  package_id;  /* Package ID of code release. */
-   long  build_date;  /* Date/time stamp when file was 
built. */
-   long  commands_offset; /* Offset to attached commands 
in Pseudo Hdr format. */
-   long  loader_offset;   /* Offset to bootloader code. */
-   long  loader_code_address; /* Start address of bootloader. 
*/
-   long  loader_code_end; /* Where bootloader code ends. */
-   long  loader_code_size;
-   long  version_data_offset; /* Offset were scrambled version 
data begins. */
-   long  version_data_size;   /* Size, in words, of scrambled 
version data. */
-   long  nDspImages;  /* Number of DSP images in file. 
*/
+   longversion_id; /* Version ID of this image format. */
+   longpackage_id; /* Package ID of code release. */
+   longbuild_date; /* Date/time stamp when file was built. 
*/
+   longcommands_offset;/* Offset to attached commands in 
Pseudo Hdr format. */
+   longloader_offset;  /* Offset to bootloader code. */
+   longloader_code_address;/* Start address of bootloader. */
+   longloader_code_end;/* Where bootloader code ends. */
+   longloader_code_size;
+   longversion_data_offset;/* Offset were scrambled version data 
begins. */
+   longversion_data_size;  /* Size, in words, of scrambled version 
data. */
+   longnDspImages; /* Number of DSP images in file. */
 };
 
 #pragma pack(1)
 struct dsp_image_info {
-   long  coff_date;   /* Date/time when DSP Coff image 
was built. */
-   long  begin_offset;/* Offset in file where image 
begins. */
-   long  end_offset;  /* Offset in file where image 
begins. */
-   long  run_address; /* On chip Start address of DSP 
code. */
-   long  image_size;  /* Size of image. */
-   long  version; /* Embedded version # of DSP 
code. */
-   unsigned shortchecksum;/* DSP File checksum */
-   unsigned shortpad1;
+   longcoff_date;  /* Date/time when DSP Coff image was 
built. */
+   longbegin_offset;   /* Offset in file where image begins. */
+   longend_offset; /* Offset in file where image begins. */
+   longrun_address;/* On chip Start address of DSP code. */
+   longimage_size; /* Size of image. */
+   longversion;/* Embedded version # of DSP code. */
+   unsigned short  checksum;   /* DSP File checksum */
+   unsigned short  pad1;
 };
 
 
@@ -180,7 +180,8 @@ static u16 get_handshake(struct ft1000_usb *ft1000dev, u16 
expected_value)
}
 
status = ft1000_read_dpram16(ft1000dev,
-DWNLD_MAG1_HANDSHAKE_LOC, (u8 
*)&handshake, 1);
+   DWNLD_MAG1_HANDSHAKE_LOC,
+   (u8 *)&handshake, 1);
handshake = ntohs(handshake);
 
if (status)
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/5] staging: ft1000-usb: Removed CVS keyword marker

2015-06-18 Thread Peter Karlsson
Fix checkpatch warnings about CVS keyword marker.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index 3b303b6..fd255c6 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -3,8 +3,6 @@
  *
  *
  * This file is part of Express Card USB Driver
- *
- * $Id:
  *
  */
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters

2015-06-18 Thread Peter Karlsson
Fix checkpatch warnings about lines over 80 characters.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h 
b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
index e9472be..af7ae70 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h
@@ -6,12 +6,12 @@
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
any
- * later version. This program is distributed in the hope that it will be 
useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details. You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version. This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details. You should have received a copy of the GNU
+ * General Public License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place -
  * Suite 330, Boston, MA 02111-1307, USA.
  *---
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters

2015-06-18 Thread Peter Karlsson
Fix checkpatch warnings about lines over 80 characters.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 6108f1e..7a9c007 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -400,7 +400,8 @@ int dsp_reload(struct ft1000_usb *ft1000dev)
msleep(1000);
 
status =
-   ft1000_write_register(ft1000dev, HOST_INTF_BE, 
FT1000_REG_SUP_CTRL);
+   ft1000_write_register(ft1000dev, HOST_INTF_BE,
+   FT1000_REG_SUP_CTRL);
 
/* Let's check for FEFE */
status =
@@ -587,8 +588,8 @@ static int ft1000_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
goto err;
}
 
-   pipe =
-   usb_sndbulkpipe(pFt1000Dev->dev, 
pFt1000Dev->bulk_out_endpointAddr);
+   pipe = usb_sndbulkpipe(pFt1000Dev->dev,
+   pFt1000Dev->bulk_out_endpointAddr);
maxlen = usb_maxpacket(pFt1000Dev->dev, pipe, usb_pipeout(pipe));
 
pdata = (u8 *)skb->data;
@@ -1069,9 +1070,8 @@ static int ft1000_dsp_prov(void *arg)
pr_debug("*** Provision Data Sent to DSP\n");
 
/* Send provisioning data */
-   ptr =
-   list_entry(info->prov_list.next, struct 
prov_record,
-  list);
+   ptr = list_entry(info->prov_list.next,
+   struct prov_record, list);
len = *(u16 *)ptr->pprov_data;
len = htons(len);
len += PSEUDOSZ;
@@ -1258,7 +1258,8 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 
size)
  FT1000_REG_DOORBELL);
if (tempword & FT1000_DB_DPRAM_TX) {
mdelay(10);
-   status = ft1000_read_register(dev, &tempword,
+   status = ft1000_read_register(dev,
+ &tempword,
  
FT1000_REG_DOORBELL);
if (tempword & FT1000_DB_DPRAM_TX)
break;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/5] staging: ft1000-usb: Fixed some issues with lines over 80 characters

2015-06-18 Thread Peter Karlsson
On 2015-06-18 08:51, Joe Perches wrote:
> On Thu, 2015-06-18 at 15:50 +0200, Peter Karlsson wrote:
> > Fix checkpatch warnings about lines over 80 characters.
> []
> > diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
> > b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
> []
> > @@ -414,12 +414,20 @@ static long ft1000_ioctl(struct file *file, unsigned 
> > int command,
> > unsigned long flags;
> > struct IOCTL_GET_VER get_ver_data;
> > struct IOCTL_GET_DSP_STAT get_stat_data;
> > -   u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 
> > 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64,
> > - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
> > 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a,
> > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
> > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> > - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 
> > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> > - 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, 
> > 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00,
> > - 0x00, 0x01, 0x00, 0x00};
> > +   u8 ConnectionMsg[] = {
> > +   0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00,
> > +   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
> 
> 7 bytes per line is unusual.
> 8 or 10 is more common.

You are right. I guess i should redo the patches. Frans Klaver also pointed
out that four commits have the same commit message, which is not good. 


Peter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 0/2] checkpatch fixes

2015-06-21 Thread Peter Karlsson
This patch set includes 2 patches fixing checkpatch warnings about
lines over 80 characters.

Changes since v1:
* Split table lines on 8 bytes instead of 7.
* Better commit message. 

Peter Karlsson (2):
  staging: ft1000-usb: fixed table alignment
  staging: ft1000-usb: shorten lines to under 80 characters

 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c   | 31 +++---
 .../staging/ft1000/ft1000-usb/ft1000_download.c| 21 ++-
 2 files changed, 35 insertions(+), 17 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: ft1000-usb: shorten lines to under 80 characters

2015-06-21 Thread Peter Karlsson
Wrap function arguments to shorten lines to under 80 characters.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c| 12 
 drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 21 ++---
 2 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index b917953..be5ddb4 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -260,7 +260,8 @@ void ft1000_destroy_dev(struct net_device *netdev)
/* Make sure we free any memory reserve for slow Queue */
for (i = 0; i < MAX_NUM_APP; i++) {
while (list_empty(&dev->app_info[i].app_sqlist) == 0) {
-   pdpram_blk = 
list_entry(dev->app_info[i].app_sqlist.next, struct dpram_blk, list);
+   pdpram_blk = 
list_entry(dev->app_info[i].app_sqlist.next,
+   struct dpram_blk, list);
list_del(&pdpram_blk->list);
ft1000_free_buffer(pdpram_blk, &freercvpool);
 
@@ -501,10 +502,12 @@ static long ft1000_ioctl(struct file *file, unsigned int 
command,
memcpy(get_stat_data.eui64, info->eui64, EUISZ);
 
if (info->ProgConStat != 0xFF) {
-   ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_LED, (u8 
*)&ledStat, FT1000_MAG_DSP_LED_INDX);
+   ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_LED,
+   (u8 *)&ledStat, 
FT1000_MAG_DSP_LED_INDX);
get_stat_data.LedStat = ntohs(ledStat);
pr_debug("LedStat = 0x%x\n", get_stat_data.LedStat);
-   ft1000_read_dpram16(ft1000dev, 
FT1000_MAG_DSP_CON_STATE, (u8 *)&conStat, FT1000_MAG_DSP_CON_STATE_INDX);
+   ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_CON_STATE,
+   (u8 *)&conStat, 
FT1000_MAG_DSP_CON_STATE_INDX);
get_stat_data.ConStat = ntohs(conStat);
pr_debug("ConStat = 0x%x\n", get_stat_data.ConStat);
} else {
@@ -694,7 +697,8 @@ static long ft1000_ioctl(struct file *file, unsigned int 
command,
if (list_empty(&ft1000dev->app_info[i].app_sqlist) == 0) {
/* pr_debug("Message detected in slow queue\n"); */
spin_lock_irqsave(&free_buff_lock, flags);
-   pdpram_blk = 
list_entry(ft1000dev->app_info[i].app_sqlist.next, struct dpram_blk, list);
+   pdpram_blk = 
list_entry(ft1000dev->app_info[i].app_sqlist.next,
+   struct dpram_blk, list);
list_del(&pdpram_blk->list);
ft1000dev->app_info[i].NumOfMsg--;
/* pr_debug("NumOfMsg for app %d = %d\n", i, 
ft1000dev->app_info[i].NumOfMsg); */
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 5def347..a72511c 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -180,7 +180,8 @@ static u16 get_handshake(struct ft1000_usb *ft1000dev, u16 
expected_value)
}
 
status = ft1000_read_dpram16(ft1000dev,
-DWNLD_MAG1_HANDSHAKE_LOC, (u8 
*)&handshake, 1);
+DWNLD_MAG1_HANDSHAKE_LOC,
+(u8 *)&handshake, 1);
handshake = ntohs(handshake);
 
if (status)
@@ -281,12 +282,14 @@ static u16 get_request_type(struct ft1000_usb *ft1000dev)
 
if (ft1000dev->bootmode == 1) {
status = fix_ft1000_read_dpram32(ft1000dev,
-DWNLD_MAG1_TYPE_LOC, (u8 
*)&tempx);
+DWNLD_MAG1_TYPE_LOC,
+(u8 *)&tempx);
tempx = ntohl(tempx);
} else {
tempx = 0;
status = ft1000_read_dpram16(ft1000dev,
-DWNLD_MAG1_TYPE_LOC, (u8 
*)&tempword, 1);
+DWNLD_MAG1_TYPE_LOC,
+(u8 *)&tempword, 1);
tempx |= (tempword << 16);
tempx = ntohl(tempx);
}
@@ -304,7 +307,8 @@ static u16 

[PATCH 1/2] staging: ft1000-usb: fixed table alignment

2015-06-21 Thread Peter Karlsson
Fixed alignment to 8 bytes per line.

Signed-off-by: Peter Karlsson 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index faac4e5..b917953 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -414,12 +414,19 @@ static long ft1000_ioctl(struct file *file, unsigned int 
command,
unsigned long flags;
struct IOCTL_GET_VER get_ver_data;
struct IOCTL_GET_DSP_STAT get_stat_data;
-   u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64,
- 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, 
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00,
- 0x00, 0x01, 0x00, 0x00};
+   u8 ConnectionMsg[] = {
+   0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64,
+   0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08,
+   0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00,
+   0x00, 0x01, 0x00, 0x00
+   };
 
unsigned short ledStat = 0;
unsigned short conStat = 0;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel