aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Belisko <marek.belisko@open-nandra.com>2010-12-09 05:26:51 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 19:34:32 -0500
commitc82632d247ce839bfb001723ad1988d30d9febb9 (patch)
tree6b795a7590773acee6e4fa65a64dd712cdeaa2ea
parent4d791234f484002d57f634e3d90ca2cd51ed144e (diff)
staging: ft1000: Remove dead code.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c61
1 files changed, 1 insertions, 60 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 85f67e564f36..58aee36498e4 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -39,12 +39,9 @@
39#include <linux/unistd.h> 39#include <linux/unistd.h>
40#include <linux/debugfs.h> 40#include <linux/debugfs.h>
41#include "ft1000_usb.h" 41#include "ft1000_usb.h"
42//#include "ft1000_ioctl.h"
43 42
44static int ft1000_flarion_cnt = 0; 43static int ft1000_flarion_cnt = 0;
45 44
46//need to looking usage of ft1000Handle
47
48static int ft1000_open (struct inode *inode, struct file *file); 45static int ft1000_open (struct inode *inode, struct file *file);
49static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait); 46static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait);
50static long ft1000_ioctl(struct file *file, unsigned int command, 47static long ft1000_ioctl(struct file *file, unsigned int command,
@@ -59,9 +56,6 @@ spinlock_t free_buff_lock;
59 56
60int numofmsgbuf = 0; 57int numofmsgbuf = 0;
61 58
62// Global variable to indicate that all provisioning data is sent to DSP
63//bool fProvComplete;
64
65// 59//
66// Table of entry-point routines for char device 60// Table of entry-point routines for char device
67// 61//
@@ -198,29 +192,6 @@ int ft1000_create_dev(struct ft1000_device *dev)
198 DEBUG("ft1000_CreateDevice: registered char device \"%s\"\n", info->DeviceName); 192 DEBUG("ft1000_CreateDevice: registered char device \"%s\"\n", info->DeviceName);
199 193
200 // initialize application information 194 // initialize application information
201
202// if (ft1000_flarion_cnt == 0) {
203//
204// DEBUG("Initialize free_buff_lock and freercvpool\n");
205// spin_lock_init(&free_buff_lock);
206//
207// // initialize a list of buffers to be use for queuing up receive command data
208// INIT_LIST_HEAD (&freercvpool);
209//
210// // create list of free buffers
211// for (i=0; i<NUM_OF_FREE_BUFFERS; i++) {
212// // Get memory for DPRAM_DATA link list
213// pdpram_blk = kmalloc ( sizeof(struct dpram_blk), GFP_KERNEL );
214// // Get a block of memory to store command data
215// pdpram_blk->pbuffer = kmalloc ( MAX_CMD_SQSIZE, GFP_KERNEL );
216// // link provisioning data
217// list_add_tail (&pdpram_blk->list, &freercvpool);
218// }
219// numofmsgbuf = NUM_OF_FREE_BUFFERS;
220// }
221
222
223 // initialize application information
224 info->appcnt = 0; 195 info->appcnt = 0;
225 for (i=0; i<MAX_NUM_APP; i++) { 196 for (i=0; i<MAX_NUM_APP; i++) {
226 info->app_info[i].nTxMsg = 0; 197 info->app_info[i].nTxMsg = 0;
@@ -235,13 +206,6 @@ int ft1000_create_dev(struct ft1000_device *dev)
235 INIT_LIST_HEAD (&info->app_info[i].app_sqlist); 206 INIT_LIST_HEAD (&info->app_info[i].app_sqlist);
236 } 207 }
237 208
238
239
240
241// ft1000Handle[info->CardNumber] = devfs_register(NULL, info->DeviceName, DEVFS_FL_AUTO_DEVNUM, 0, 0,
242// S_IFCHR | S_IRUGO | S_IWUGO, &ft1000fops, NULL);
243
244
245 info->DeviceCreated = TRUE; 209 info->DeviceCreated = TRUE;
246 ft1000_flarion_cnt++; 210 ft1000_flarion_cnt++;
247 211
@@ -313,9 +277,6 @@ void ft1000_destroy_dev(struct net_device *dev)
313 kfree(ptr); 277 kfree(ptr);
314 } 278 }
315 } 279 }
316
317// devfs_unregister(ft1000Handle[info->CardNumber]);
318
319 info->DeviceCreated = FALSE; 280 info->DeviceCreated = FALSE;
320 } 281 }
321 282
@@ -609,19 +570,11 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
609 if (!dpram_data) 570 if (!dpram_data)
610 break; 571 break;
611 572
612 //if ( copy_from_user(&(dpram_command.dpram_blk), (PIOCTL_DPRAM_BLK)argument, msgsz+2) ) {
613 if ( copy_from_user(dpram_data, argp, msgsz+2) ) { 573 if ( copy_from_user(dpram_data, argp, msgsz+2) ) {
614 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); 574 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n");
615 result = -EFAULT; 575 result = -EFAULT;
616 } 576 }
617 else { 577 else {
618#if 0
619 // whc - for debugging only
620 ptr = (char *)&dpram_data;
621 for (i=0; i<msgsz; i++) {
622 DEBUG(1,"FT1000:ft1000_ChIoctl: data %d = 0x%x\n", i, *ptr++);
623 }
624#endif
625 // Check if this message came from a registered application 578 // Check if this message came from a registered application
626 for (i=0; i<MAX_NUM_APP; i++) { 579 for (i=0; i<MAX_NUM_APP; i++) {
627 if ( info->app_info[i].fileobject == &file->f_owner) { 580 if ( info->app_info[i].fileobject == &file->f_owner) {
@@ -637,7 +590,6 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
637 app_index = i; 590 app_index = i;
638 591
639 // Check message qtype type which is the lower byte within qos_class 592 // Check message qtype type which is the lower byte within qos_class
640 //qtype = ntohs(dpram_command.dpram_blk.pseudohdr.qos_class) & 0xff;
641 qtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff; 593 qtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff;
642 //DEBUG("FT1000_ft1000_ioctl: qtype = %d\n", qtype); 594 //DEBUG("FT1000_ft1000_ioctl: qtype = %d\n", qtype);
643 if (qtype) { 595 if (qtype) {
@@ -677,7 +629,6 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
677 // Make sure we are within the limits of the slow queue memory limitation 629 // Make sure we are within the limits of the slow queue memory limitation
678 if ( (msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ) ) { 630 if ( (msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ) ) {
679 // Need to put sequence number plus new checksum for message 631 // Need to put sequence number plus new checksum for message
680 //pmsg = (u16 *)&dpram_command.dpram_blk.pseudohdr;
681 pmsg = (u16 *)&dpram_data->pseudohdr; 632 pmsg = (u16 *)&dpram_data->pseudohdr;
682 ppseudo_hdr = (struct pseudo_hdr *)pmsg; 633 ppseudo_hdr = (struct pseudo_hdr *)pmsg;
683 total_len = msgsz+2; 634 total_len = msgsz+2;
@@ -697,17 +648,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command,
697 } 648 }
698 pmsg++; 649 pmsg++;
699 ppseudo_hdr = (struct pseudo_hdr *)pmsg; 650 ppseudo_hdr = (struct pseudo_hdr *)pmsg;
700#if 0 651 CardSendCommand(ft1000dev,(unsigned short*)dpram_data,total_len+2);
701 ptr = dpram_data;
702 DEBUG("FT1000:ft1000_ChIoctl: Command Send\n");
703 for (i=0; i<total_len; i++) {
704 DEBUG("FT1000:ft1000_ChIoctl: data %d = 0x%x\n", i, *ptr++);
705 }
706#endif
707 //dpram_command.extra = 0;
708
709 //CardSendCommand(ft1000dev,(unsigned char*)&dpram_command,total_len+2);
710 CardSendCommand(ft1000dev,(unsigned short*)dpram_data,total_len+2);
711 652
712 653
713 info->app_info[app_index].nTxMsg++; 654 info->app_info[app_index].nTxMsg++;