Commit 002c6d57 authored by Katja Collier's avatar Katja Collier Committed by Greg Kroah-Hartman

staging: fixed spaces around parens in ft1000

Deleted extra spaces before and after parens, added a couple necessary
spaces before parens in
"/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c" and
"/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h".
Signed-off-by: default avatarKatja Collier <katjacollier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 52adc0b4
...@@ -40,11 +40,11 @@ ...@@ -40,11 +40,11 @@
static int ft1000_flarion_cnt = 0; static int ft1000_flarion_cnt = 0;
static int ft1000_open (struct inode *inode, struct file *file); static int ft1000_open(struct inode *inode, struct file *file);
static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait); static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait);
static long ft1000_ioctl(struct file *file, unsigned int command, static long ft1000_ioctl(struct file *file, unsigned int command,
unsigned long argument); unsigned long argument);
static int ft1000_release (struct inode *inode, struct file *file); static int ft1000_release(struct inode *inode, struct file *file);
/* List to free receive command buffer pool */ /* List to free receive command buffer pool */
struct list_head freercvpool; struct list_head freercvpool;
...@@ -86,7 +86,7 @@ struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist) ...@@ -86,7 +86,7 @@ struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist)
spin_lock_irqsave(&free_buff_lock, flags); spin_lock_irqsave(&free_buff_lock, flags);
/* Check if buffer is available */ /* Check if buffer is available */
if ( list_empty(bufflist) ) { if (list_empty(bufflist)) {
DEBUG("ft1000_get_buffer: No more buffer - %d\n", numofmsgbuf); DEBUG("ft1000_get_buffer: No more buffer - %d\n", numofmsgbuf);
ptr = NULL; ptr = NULL;
} }
...@@ -204,7 +204,7 @@ int ft1000_create_dev(struct ft1000_usb *dev) ...@@ -204,7 +204,7 @@ int ft1000_create_dev(struct ft1000_usb *dev)
dev->app_info[i].DspBCMsgFlag = 0; dev->app_info[i].DspBCMsgFlag = 0;
dev->app_info[i].NumOfMsg = 0; dev->app_info[i].NumOfMsg = 0;
init_waitqueue_head(&dev->app_info[i].wait_dpram_msg); init_waitqueue_head(&dev->app_info[i].wait_dpram_msg);
INIT_LIST_HEAD (&dev->app_info[i].app_sqlist); INIT_LIST_HEAD(&dev->app_info[i].app_sqlist);
} }
dev->DeviceCreated = TRUE; dev->DeviceCreated = TRUE;
...@@ -298,7 +298,7 @@ void ft1000_destroy_dev(struct net_device *netdev) ...@@ -298,7 +298,7 @@ void ft1000_destroy_dev(struct net_device *netdev)
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static int ft1000_open (struct inode *inode, struct file *file) static int ft1000_open(struct inode *inode, struct file *file)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private;
...@@ -310,7 +310,7 @@ static int ft1000_open (struct inode *inode, struct file *file) ...@@ -310,7 +310,7 @@ static int ft1000_open (struct inode *inode, struct file *file)
info = file->private_data = netdev_priv(dev->net); info = file->private_data = netdev_priv(dev->net);
DEBUG("f_owner = %p number of application = %d\n", (&file->f_owner), dev->appcnt ); DEBUG("f_owner = %p number of application = %d\n", (&file->f_owner), dev->appcnt);
/* Check if maximum number of application exceeded */ /* Check if maximum number of application exceeded */
if (dev->appcnt > MAX_NUM_APP) { if (dev->appcnt > MAX_NUM_APP) {
...@@ -320,7 +320,7 @@ static int ft1000_open (struct inode *inode, struct file *file) ...@@ -320,7 +320,7 @@ static int ft1000_open (struct inode *inode, struct file *file)
/* Search for available application info block */ /* Search for available application info block */
for (i=0; i<MAX_NUM_APP; i++) { for (i=0; i<MAX_NUM_APP; i++) {
if ( (dev->app_info[i].fileobject == NULL) ) { if ((dev->app_info[i].fileobject == NULL)) {
break; break;
} }
} }
...@@ -371,7 +371,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -371,7 +371,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
/* Search for matching file object */ /* Search for matching file object */
for (i=0; i<MAX_NUM_APP; i++) { for (i=0; i<MAX_NUM_APP; i++) {
if ( dev->app_info[i].fileobject == &file->f_owner) { if (dev->app_info[i].fileobject == &file->f_owner) {
/* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */ /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */
break; break;
} }
...@@ -380,7 +380,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -380,7 +380,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
/* Could not find application info block */ /* Could not find application info block */
if (i == MAX_NUM_APP) { if (i == MAX_NUM_APP) {
DEBUG("FT1000:ft1000_ioctl:Could not find application info block\n"); DEBUG("FT1000:ft1000_ioctl:Could not find application info block\n");
return ( -EACCES ); return (-EACCES);
} }
if (list_empty(&dev->app_info[i].app_sqlist) == 0) { if (list_empty(&dev->app_info[i].app_sqlist) == 0) {
...@@ -388,7 +388,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -388,7 +388,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
return(POLLIN | POLLRDNORM | POLLPRI); return(POLLIN | POLLRDNORM | POLLPRI);
} }
poll_wait (file, &dev->app_info[i].wait_dpram_msg, wait); poll_wait(file, &dev->app_info[i].wait_dpram_msg, wait);
/* DEBUG("FT1000:ft1000_poll_dev:Polling for data from DSP\n"); */ /* DEBUG("FT1000:ft1000_poll_dev:Polling for data from DSP\n"); */
return (0); return (0);
...@@ -406,7 +406,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) ...@@ -406,7 +406,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static long ft1000_ioctl (struct file *file, unsigned int command, static long ft1000_ioctl(struct file *file, unsigned int command,
unsigned long argument) unsigned long argument)
{ {
void __user *argp = (void __user *)argument; void __user *argp = (void __user *)argument;
...@@ -470,7 +470,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -470,7 +470,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
get_ver_data.drv_ver = FT1000_DRV_VER; get_ver_data.drv_ver = FT1000_DRV_VER;
if (copy_to_user(argp, &get_ver_data, sizeof(get_ver_data)) ) { if (copy_to_user(argp, &get_ver_data, sizeof(get_ver_data))) {
DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
result = -EFAULT; result = -EFAULT;
break; break;
...@@ -517,10 +517,10 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -517,10 +517,10 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
get_stat_data.nRxPkts = info->stats.rx_packets; get_stat_data.nRxPkts = info->stats.rx_packets;
get_stat_data.nTxBytes = info->stats.tx_bytes; get_stat_data.nTxBytes = info->stats.tx_bytes;
get_stat_data.nRxBytes = info->stats.rx_bytes; get_stat_data.nRxBytes = info->stats.rx_bytes;
do_gettimeofday ( &tv ); do_gettimeofday(&tv);
get_stat_data.ConTm = (u32)(tv.tv_sec - info->ConTm); get_stat_data.ConTm = (u32)(tv.tv_sec - info->ConTm);
DEBUG("Connection Time = %d\n", (int)get_stat_data.ConTm); DEBUG("Connection Time = %d\n", (int)get_stat_data.ConTm);
if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data)) ) { if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data))) {
DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
result = -EFAULT; result = -EFAULT;
break; break;
...@@ -562,7 +562,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -562,7 +562,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
/* Get the length field to see how many bytes to copy */ /* Get the length field to see how many bytes to copy */
result = get_user(msgsz, (__u16 __user *)argp); result = get_user(msgsz, (__u16 __user *)argp);
msgsz = ntohs (msgsz); msgsz = ntohs(msgsz);
/* DEBUG("FT1000:ft1000_ioctl: length of message = %d\n", msgsz); */ /* DEBUG("FT1000:ft1000_ioctl: length of message = %d\n", msgsz); */
if (msgsz > MAX_CMD_SQSIZE) { if (msgsz > MAX_CMD_SQSIZE) {
...@@ -576,7 +576,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -576,7 +576,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
if (!dpram_data) if (!dpram_data)
break; break;
if ( copy_from_user(dpram_data, argp, msgsz+2) ) { if (copy_from_user(dpram_data, argp, msgsz+2)) {
DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n");
result = -EFAULT; result = -EFAULT;
} }
...@@ -633,7 +633,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -633,7 +633,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
/*DEBUG("FT1000_ft1000_ioctl: finished reading register\n"); */ /*DEBUG("FT1000_ft1000_ioctl: finished reading register\n"); */
/* Make sure we are within the limits of the slow queue memory limitation */ /* Make sure we are within the limits of the slow queue memory limitation */
if ( (msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ) ) { if ((msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ)) {
/* Need to put sequence number plus new checksum for message */ /* Need to put sequence number plus new checksum for message */
pmsg = (u16 *)&dpram_data->pseudohdr; pmsg = (u16 *)&dpram_data->pseudohdr;
ppseudo_hdr = (struct pseudo_hdr *)pmsg; ppseudo_hdr = (struct pseudo_hdr *)pmsg;
...@@ -716,7 +716,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -716,7 +716,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
break; break;
msglen = htons(msglen); msglen = htons(msglen);
/* DEBUG("FT1000:ft1000_ioctl:msg length = %x\n", msglen); */ /* DEBUG("FT1000:ft1000_ioctl:msg length = %x\n", msglen); */
if(copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) { if (copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) {
DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
result = -EFAULT; result = -EFAULT;
break; break;
...@@ -750,7 +750,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, ...@@ -750,7 +750,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
* *
*--------------------------------------------------------------------------- *---------------------------------------------------------------------------
*/ */
static int ft1000_release (struct inode *inode, struct file *file) static int ft1000_release(struct inode *inode, struct file *file)
{ {
struct ft1000_info *info; struct ft1000_info *info;
struct net_device *dev; struct net_device *dev;
...@@ -771,7 +771,7 @@ static int ft1000_release (struct inode *inode, struct file *file) ...@@ -771,7 +771,7 @@ static int ft1000_release (struct inode *inode, struct file *file)
/* Search for matching file object */ /* Search for matching file object */
for (i=0; i<MAX_NUM_APP; i++) { for (i=0; i<MAX_NUM_APP; i++) {
if ( ft1000dev->app_info[i].fileobject == &file->f_owner) { if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
/* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */ /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */
break; break;
} }
......
...@@ -94,12 +94,12 @@ typedef struct _IOCTL_DPRAM_COMMAND { ...@@ -94,12 +94,12 @@ typedef struct _IOCTL_DPRAM_COMMAND {
#define IOCTL_CONNECT 10 #define IOCTL_CONNECT 10
#define IOCTL_DISCONNECT 11 #define IOCTL_DISCONNECT 11
#define IOCTL_FT1000_GET_DSP_STAT _IOR (FT1000_MAGIC_CODE, IOCTL_GET_DSP_STAT_CMD, sizeof(IOCTL_GET_DSP_STAT) ) #define IOCTL_FT1000_GET_DSP_STAT _IOR(FT1000_MAGIC_CODE, IOCTL_GET_DSP_STAT_CMD, sizeof(IOCTL_GET_DSP_STAT)
#define IOCTL_FT1000_GET_VER _IOR (FT1000_MAGIC_CODE, IOCTL_GET_VER_CMD, sizeof(IOCTL_GET_VER) ) #define IOCTL_FT1000_GET_VER _IOR(FT1000_MAGIC_CODE, IOCTL_GET_VER_CMD, sizeof(IOCTL_GET_VER)
#define IOCTL_FT1000_CONNECT _IOW (FT1000_MAGIC_CODE, IOCTL_CONNECT, 0 ) #define IOCTL_FT1000_CONNECT _IOW(FT1000_MAGIC_CODE, IOCTL_CONNECT, 0
#define IOCTL_FT1000_DISCONNECT _IOW (FT1000_MAGIC_CODE, IOCTL_DISCONNECT, 0 ) #define IOCTL_FT1000_DISCONNECT _IOW(FT1000_MAGIC_CODE, IOCTL_DISCONNECT, 0
#define IOCTL_FT1000_SET_DPRAM _IOW (FT1000_MAGIC_CODE, IOCTL_SET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK) ) #define IOCTL_FT1000_SET_DPRAM _IOW(FT1000_MAGIC_CODE, IOCTL_SET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK)
#define IOCTL_FT1000_GET_DPRAM _IOR (FT1000_MAGIC_CODE, IOCTL_GET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK) ) #define IOCTL_FT1000_GET_DPRAM _IOR(FT1000_MAGIC_CODE, IOCTL_GET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK)
#define IOCTL_FT1000_REGISTER _IOW (FT1000_MAGIC_CODE, IOCTL_REGISTER_CMD, sizeof(unsigned short *) ) #define IOCTL_FT1000_REGISTER _IOW(FT1000_MAGIC_CODE, IOCTL_REGISTER_CMD, sizeof(unsigned short *)
#endif /* _FT1000IOCTLH_ */ #endif /* _FT1000IOCTLH_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment