aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Belisko <marek.belisko@open-nandra.com>2010-12-09 05:26:50 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 19:34:32 -0500
commit4d791234f484002d57f634e3d90ca2cd51ed144e (patch)
treeb78beb084a8a7e20d22858e39c1ea28de8d375b6
parent67e9f9e26b7d8862ec2e2a3ac0e56590088e9281 (diff)
staging: ft1000: Fix camelcase functions and variables.
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.c156
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_hw.c2
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_usb.c2
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_usb.h4
4 files changed, 82 insertions, 82 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 4e5c8a3bc888..85f67e564f36 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -45,11 +45,11 @@ static int ft1000_flarion_cnt = 0;
45 45
46//need to looking usage of ft1000Handle 46//need to looking usage of ft1000Handle
47 47
48static int ft1000_ChOpen (struct inode *Inode, struct file *File); 48static int ft1000_open (struct inode *inode, struct file *file);
49static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait); 49static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait);
50static long ft1000_ChIoctl(struct file *File, unsigned int Command, 50static long ft1000_ioctl(struct file *file, unsigned int command,
51 unsigned long Argument); 51 unsigned long argument);
52static int ft1000_ChRelease (struct inode *Inode, struct file *File); 52static int ft1000_release (struct inode *inode, struct file *file);
53 53
54// List to free receive command buffer pool 54// List to free receive command buffer pool
55struct list_head freercvpool; 55struct list_head freercvpool;
@@ -67,10 +67,10 @@ int numofmsgbuf = 0;
67// 67//
68static struct file_operations ft1000fops = 68static struct file_operations ft1000fops =
69{ 69{
70 .unlocked_ioctl = ft1000_ChIoctl, 70 .unlocked_ioctl = ft1000_ioctl,
71 .poll = ft1000_ChPoll, 71 .poll = ft1000_poll_dev,
72 .open = ft1000_ChOpen, 72 .open = ft1000_open,
73 .release = ft1000_ChRelease, 73 .release = ft1000_release,
74 .llseek = no_llseek, 74 .llseek = no_llseek,
75}; 75};
76 76
@@ -147,7 +147,7 @@ void ft1000_free_buffer(struct dpram_blk *pdpram_blk, struct list_head *plist)
147// Notes: Only called by init_module(). 147// Notes: Only called by init_module().
148// 148//
149//--------------------------------------------------------------------------- 149//---------------------------------------------------------------------------
150int ft1000_CreateDevice(struct ft1000_device *dev) 150int ft1000_create_dev(struct ft1000_device *dev)
151{ 151{
152 struct ft1000_info *info = netdev_priv(dev->net); 152 struct ft1000_info *info = netdev_priv(dev->net);
153 int result; 153 int result;
@@ -265,7 +265,7 @@ fail:
265// Notes: Only called by cleanup_module(). 265// Notes: Only called by cleanup_module().
266// 266//
267//--------------------------------------------------------------------------- 267//---------------------------------------------------------------------------
268void ft1000_DestroyDevice(struct net_device *dev) 268void ft1000_destroy_dev(struct net_device *dev)
269{ 269{
270 struct ft1000_info *info = netdev_priv(dev); 270 struct ft1000_info *info = netdev_priv(dev);
271 int i; 271 int i;
@@ -323,7 +323,7 @@ void ft1000_DestroyDevice(struct net_device *dev)
323} 323}
324 324
325//--------------------------------------------------------------------------- 325//---------------------------------------------------------------------------
326// Function: ft1000_ChOpen 326// Function: ft1000_open
327// 327//
328// Parameters: 328// Parameters:
329// 329//
@@ -332,19 +332,19 @@ void ft1000_DestroyDevice(struct net_device *dev)
332// Notes: 332// Notes:
333// 333//
334//--------------------------------------------------------------------------- 334//---------------------------------------------------------------------------
335static int ft1000_ChOpen (struct inode *Inode, struct file *File) 335static int ft1000_open (struct inode *inode, struct file *file)
336{ 336{
337 struct ft1000_info *info; 337 struct ft1000_info *info;
338 struct ft1000_device *dev = (struct ft1000_device *)Inode->i_private; 338 struct ft1000_device *dev = (struct ft1000_device *)inode->i_private;
339 int i,num; 339 int i,num;
340 340
341 DEBUG("ft1000_ChOpen called\n"); 341 DEBUG("ft1000_open called\n");
342 num = (MINOR(Inode->i_rdev) & 0xf); 342 num = (MINOR(inode->i_rdev) & 0xf);
343 DEBUG("ft1000_ChOpen: minor number=%d\n", num); 343 DEBUG("ft1000_open: minor number=%d\n", num);
344 344
345 info = File->private_data = netdev_priv(dev->net); 345 info = file->private_data = netdev_priv(dev->net);
346 346
347 DEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt ); 347 DEBUG("f_owner = %p number of application = %d\n", (&file->f_owner), info->appcnt );
348 348
349 // Check if maximum number of application exceeded 349 // Check if maximum number of application exceeded
350 if (info->appcnt > MAX_NUM_APP) { 350 if (info->appcnt > MAX_NUM_APP) {
@@ -366,19 +366,19 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
366 } 366 }
367 367
368 info->appcnt++; 368 info->appcnt++;
369 info->app_info[i].fileobject = &File->f_owner; 369 info->app_info[i].fileobject = &file->f_owner;
370 info->app_info[i].nTxMsg = 0; 370 info->app_info[i].nTxMsg = 0;
371 info->app_info[i].nRxMsg = 0; 371 info->app_info[i].nRxMsg = 0;
372 info->app_info[i].nTxMsgReject = 0; 372 info->app_info[i].nTxMsgReject = 0;
373 info->app_info[i].nRxMsgMiss = 0; 373 info->app_info[i].nRxMsgMiss = 0;
374 374
375 nonseekable_open(Inode, File); 375 nonseekable_open(inode, file);
376 return 0; 376 return 0;
377} 377}
378 378
379 379
380//--------------------------------------------------------------------------- 380//---------------------------------------------------------------------------
381// Function: ft1000_ChPoll 381// Function: ft1000_poll_dev
382// 382//
383// Parameters: 383// Parameters:
384// 384//
@@ -388,15 +388,15 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
388// 388//
389//--------------------------------------------------------------------------- 389//---------------------------------------------------------------------------
390 390
391static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait) 391static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait)
392{ 392{
393 struct net_device *dev = file->private_data; 393 struct net_device *dev = file->private_data;
394 struct ft1000_info *info; 394 struct ft1000_info *info;
395 int i; 395 int i;
396 396
397 //DEBUG("ft1000_ChPoll called\n"); 397 //DEBUG("ft1000_poll_dev called\n");
398 if (ft1000_flarion_cnt == 0) { 398 if (ft1000_flarion_cnt == 0) {
399 DEBUG("FT1000:ft1000_ChPoll called when ft1000_flarion_cnt is zero\n"); 399 DEBUG("FT1000:ft1000_poll_dev called when ft1000_flarion_cnt is zero\n");
400 return (-EBADF); 400 return (-EBADF);
401 } 401 }
402 402
@@ -405,30 +405,30 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
405 // Search for matching file object 405 // Search for matching file object
406 for (i=0; i<MAX_NUM_APP; i++) { 406 for (i=0; i<MAX_NUM_APP; i++) {
407 if ( info->app_info[i].fileobject == &file->f_owner) { 407 if ( info->app_info[i].fileobject == &file->f_owner) {
408 //DEBUG("FT1000:ft1000_ChIoctl: Message is for AppId = %d\n", info->app_info[i].app_id); 408 //DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", info->app_info[i].app_id);
409 break; 409 break;
410 } 410 }
411 } 411 }
412 412
413 // Could not find application info block 413 // Could not find application info block
414 if (i == MAX_NUM_APP) { 414 if (i == MAX_NUM_APP) {
415 DEBUG("FT1000:ft1000_ChIoctl:Could not find application info block\n"); 415 DEBUG("FT1000:ft1000_ioctl:Could not find application info block\n");
416 return ( -EACCES ); 416 return ( -EACCES );
417 } 417 }
418 418
419 if (list_empty(&info->app_info[i].app_sqlist) == 0) { 419 if (list_empty(&info->app_info[i].app_sqlist) == 0) {
420 DEBUG("FT1000:ft1000_ChPoll:Message detected in slow queue\n"); 420 DEBUG("FT1000:ft1000_poll_dev:Message detected in slow queue\n");
421 return(POLLIN | POLLRDNORM | POLLPRI); 421 return(POLLIN | POLLRDNORM | POLLPRI);
422 } 422 }
423 423
424 poll_wait (file, &info->app_info[i].wait_dpram_msg, wait); 424 poll_wait (file, &info->app_info[i].wait_dpram_msg, wait);
425 //DEBUG("FT1000:ft1000_ChPoll:Polling for data from DSP\n"); 425 //DEBUG("FT1000:ft1000_poll_dev:Polling for data from DSP\n");
426 426
427 return (0); 427 return (0);
428} 428}
429 429
430//--------------------------------------------------------------------------- 430//---------------------------------------------------------------------------
431// Function: ft1000_ChIoctl 431// Function: ft1000_ioctl
432// 432//
433// Parameters: 433// Parameters:
434// 434//
@@ -437,10 +437,10 @@ static unsigned int ft1000_ChPoll(struct file *file, poll_table *wait)
437// Notes: 437// Notes:
438// 438//
439//--------------------------------------------------------------------------- 439//---------------------------------------------------------------------------
440static long ft1000_ChIoctl (struct file *File, unsigned int Command, 440static long ft1000_ioctl (struct file *file, unsigned int command,
441 unsigned long Argument) 441 unsigned long argument)
442{ 442{
443 void __user *argp = (void __user *)Argument; 443 void __user *argp = (void __user *)argument;
444 struct net_device *dev; 444 struct net_device *dev;
445 struct ft1000_info *info; 445 struct ft1000_info *info;
446 struct ft1000_device *ft1000dev; 446 struct ft1000_device *ft1000dev;
@@ -462,25 +462,25 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
462 unsigned short ledStat=0; 462 unsigned short ledStat=0;
463 unsigned short conStat=0; 463 unsigned short conStat=0;
464 464
465 //DEBUG("ft1000_ChIoctl called\n"); 465 //DEBUG("ft1000_ioctl called\n");
466 466
467 if (ft1000_flarion_cnt == 0) { 467 if (ft1000_flarion_cnt == 0) {
468 DEBUG("FT1000:ft1000_ChIoctl called when ft1000_flarion_cnt is zero\n"); 468 DEBUG("FT1000:ft1000_ioctl called when ft1000_flarion_cnt is zero\n");
469 return (-EBADF); 469 return (-EBADF);
470 } 470 }
471 471
472 //DEBUG("FT1000:ft1000_ChIoctl:Command = 0x%x Argument = 0x%8x\n", Command, (u32)Argument); 472 //DEBUG("FT1000:ft1000_ioctl:command = 0x%x argument = 0x%8x\n", command, (u32)argument);
473 473
474 dev = File->private_data; 474 dev = file->private_data;
475 info = netdev_priv(dev); 475 info = netdev_priv(dev);
476 ft1000dev = info->pFt1000Dev; 476 ft1000dev = info->pFt1000Dev;
477 cmd = _IOC_NR(Command); 477 cmd = _IOC_NR(command);
478 //DEBUG("FT1000:ft1000_ChIoctl:cmd = 0x%x\n", cmd); 478 //DEBUG("FT1000:ft1000_ioctl:cmd = 0x%x\n", cmd);
479 479
480 // process the command 480 // process the command
481 switch (cmd) { 481 switch (cmd) {
482 case IOCTL_REGISTER_CMD: 482 case IOCTL_REGISTER_CMD:
483 DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_REGISTER called\n"); 483 DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_REGISTER called\n");
484 result = get_user(tempword, (__u16 __user*)argp); 484 result = get_user(tempword, (__u16 __user*)argp);
485 if (result) { 485 if (result) {
486 DEBUG("result = %d failed to get_user\n", result); 486 DEBUG("result = %d failed to get_user\n", result);
@@ -489,9 +489,9 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
489 if (tempword == DSPBCMSGID) { 489 if (tempword == DSPBCMSGID) {
490 // Search for matching file object 490 // Search for matching file object
491 for (i=0; i<MAX_NUM_APP; i++) { 491 for (i=0; i<MAX_NUM_APP; i++) {
492 if ( info->app_info[i].fileobject == &File->f_owner) { 492 if ( info->app_info[i].fileobject == &file->f_owner) {
493 info->app_info[i].DspBCMsgFlag = 1; 493 info->app_info[i].DspBCMsgFlag = 1;
494 DEBUG("FT1000:ft1000_ChIoctl:Registered for broadcast messages\n"); 494 DEBUG("FT1000:ft1000_ioctl:Registered for broadcast messages\n");
495 break; 495 break;
496 } 496 }
497 } 497 }
@@ -499,34 +499,34 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
499 break; 499 break;
500 500
501 case IOCTL_GET_VER_CMD: 501 case IOCTL_GET_VER_CMD:
502 DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_GET_VER called\n"); 502 DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_GET_VER called\n");
503 503
504 get_ver_data.drv_ver = FT1000_DRV_VER; 504 get_ver_data.drv_ver = FT1000_DRV_VER;
505 505
506 if (copy_to_user(argp, &get_ver_data, sizeof(get_ver_data)) ) { 506 if (copy_to_user(argp, &get_ver_data, sizeof(get_ver_data)) ) {
507 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); 507 DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
508 result = -EFAULT; 508 result = -EFAULT;
509 break; 509 break;
510 } 510 }
511 511
512 DEBUG("FT1000:ft1000_ChIoctl:driver version = 0x%x\n",(unsigned int)get_ver_data.drv_ver); 512 DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n",(unsigned int)get_ver_data.drv_ver);
513 513
514 break; 514 break;
515 case IOCTL_CONNECT: 515 case IOCTL_CONNECT:
516 // Connect Message 516 // Connect Message
517 DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_CONNECT\n"); 517 DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_CONNECT\n");
518 ConnectionMsg[79] = 0xfc; 518 ConnectionMsg[79] = 0xfc;
519 CardSendCommand(ft1000dev, (unsigned short *)ConnectionMsg, 0x4c); 519 CardSendCommand(ft1000dev, (unsigned short *)ConnectionMsg, 0x4c);
520 520
521 break; 521 break;
522 case IOCTL_DISCONNECT: 522 case IOCTL_DISCONNECT:
523 // Disconnect Message 523 // Disconnect Message
524 DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_DISCONNECT\n"); 524 DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_DISCONNECT\n");
525 ConnectionMsg[79] = 0xfd; 525 ConnectionMsg[79] = 0xfd;
526 CardSendCommand(ft1000dev, (unsigned short *)ConnectionMsg, 0x4c); 526 CardSendCommand(ft1000dev, (unsigned short *)ConnectionMsg, 0x4c);
527 break; 527 break;
528 case IOCTL_GET_DSP_STAT_CMD: 528 case IOCTL_GET_DSP_STAT_CMD:
529 //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_GET_DSP_STAT called\n"); 529 //DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_GET_DSP_STAT called\n");
530 memset(&get_stat_data, 0, sizeof(get_stat_data)); 530 memset(&get_stat_data, 0, sizeof(get_stat_data));
531 memcpy(get_stat_data.DspVer, info->DspVer, DSPVERSZ); 531 memcpy(get_stat_data.DspVer, info->DspVer, DSPVERSZ);
532 memcpy(get_stat_data.HwSerNum, info->HwSerNum, HWSERNUMSZ); 532 memcpy(get_stat_data.HwSerNum, info->HwSerNum, HWSERNUMSZ);
@@ -536,10 +536,10 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
536 if (info->ProgConStat != 0xFF) { 536 if (info->ProgConStat != 0xFF) {
537 ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_LED, (u8 *)&ledStat, FT1000_MAG_DSP_LED_INDX); 537 ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_LED, (u8 *)&ledStat, FT1000_MAG_DSP_LED_INDX);
538 get_stat_data.LedStat = ntohs(ledStat); 538 get_stat_data.LedStat = ntohs(ledStat);
539 DEBUG("FT1000:ft1000_ChIoctl: LedStat = 0x%x\n", get_stat_data.LedStat); 539 DEBUG("FT1000:ft1000_ioctl: LedStat = 0x%x\n", get_stat_data.LedStat);
540 ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_CON_STATE, (u8 *)&conStat, FT1000_MAG_DSP_CON_STATE_INDX); 540 ft1000_read_dpram16(ft1000dev, FT1000_MAG_DSP_CON_STATE, (u8 *)&conStat, FT1000_MAG_DSP_CON_STATE_INDX);
541 get_stat_data.ConStat = ntohs(conStat); 541 get_stat_data.ConStat = ntohs(conStat);
542 DEBUG("FT1000:ft1000_ChIoctl: ConStat = 0x%x\n", get_stat_data.ConStat); 542 DEBUG("FT1000:ft1000_ioctl: ConStat = 0x%x\n", get_stat_data.ConStat);
543 } 543 }
544 else { 544 else {
545 get_stat_data.ConStat = 0x0f; 545 get_stat_data.ConStat = 0x0f;
@@ -554,7 +554,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
554 get_stat_data.ConTm = (u32)(tv.tv_sec - info->ConTm); 554 get_stat_data.ConTm = (u32)(tv.tv_sec - info->ConTm);
555 DEBUG("Connection Time = %d\n", (int)get_stat_data.ConTm); 555 DEBUG("Connection Time = %d\n", (int)get_stat_data.ConTm);
556 if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data)) ) { 556 if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data)) ) {
557 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); 557 DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
558 result = -EFAULT; 558 result = -EFAULT;
559 break; 559 break;
560 } 560 }
@@ -572,7 +572,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
572 u16 app_index; 572 u16 app_index;
573 u16 status; 573 u16 status;
574 574
575 //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_SET_DPRAM called\n"); 575 //DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_SET_DPRAM called\n");
576 576
577 577
578 if (ft1000_flarion_cnt == 0) { 578 if (ft1000_flarion_cnt == 0) {
@@ -591,15 +591,15 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
591 591
592 if (info->CardReady) { 592 if (info->CardReady) {
593 593
594 //DEBUG("FT1000:ft1000_ChIoctl: try to SET_DPRAM \n"); 594 //DEBUG("FT1000:ft1000_ioctl: try to SET_DPRAM \n");
595 595
596 // Get the length field to see how many bytes to copy 596 // Get the length field to see how many bytes to copy
597 result = get_user(msgsz, (__u16 __user *)argp); 597 result = get_user(msgsz, (__u16 __user *)argp);
598 msgsz = ntohs (msgsz); 598 msgsz = ntohs (msgsz);
599 //DEBUG("FT1000:ft1000_ChIoctl: length of message = %d\n", msgsz); 599 //DEBUG("FT1000:ft1000_ioctl: length of message = %d\n", msgsz);
600 600
601 if (msgsz > MAX_CMD_SQSIZE) { 601 if (msgsz > MAX_CMD_SQSIZE) {
602 DEBUG("FT1000:ft1000_ChIoctl: bad message length = %d\n", msgsz); 602 DEBUG("FT1000:ft1000_ioctl: bad message length = %d\n", msgsz);
603 result = -EINVAL; 603 result = -EINVAL;
604 break; 604 break;
605 } 605 }
@@ -609,7 +609,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
609 if (!dpram_data) 609 if (!dpram_data)
610 break; 610 break;
611 611
612 //if ( copy_from_user(&(dpram_command.dpram_blk), (PIOCTL_DPRAM_BLK)Argument, msgsz+2) ) { 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) ) { 613 if ( copy_from_user(dpram_data, argp, msgsz+2) ) {
614 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); 614 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n");
615 result = -EFAULT; 615 result = -EFAULT;
@@ -624,7 +624,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
624#endif 624#endif
625 // Check if this message came from a registered application 625 // Check if this message came from a registered application
626 for (i=0; i<MAX_NUM_APP; i++) { 626 for (i=0; i<MAX_NUM_APP; i++) {
627 if ( info->app_info[i].fileobject == &File->f_owner) { 627 if ( info->app_info[i].fileobject == &file->f_owner) {
628 break; 628 break;
629 } 629 }
630 } 630 }
@@ -639,14 +639,14 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
639 // Check message qtype type which is the lower byte within qos_class 639 // Check message qtype type which is the lower byte within qos_class
640 //qtype = ntohs(dpram_command.dpram_blk.pseudohdr.qos_class) & 0xff; 640 //qtype = ntohs(dpram_command.dpram_blk.pseudohdr.qos_class) & 0xff;
641 qtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff; 641 qtype = ntohs(dpram_data->pseudohdr.qos_class) & 0xff;
642 //DEBUG("FT1000_ft1000_ChIoctl: qtype = %d\n", qtype); 642 //DEBUG("FT1000_ft1000_ioctl: qtype = %d\n", qtype);
643 if (qtype) { 643 if (qtype) {
644 } 644 }
645 else { 645 else {
646 // Put message into Slow Queue 646 // Put message into Slow Queue
647 // Only put a message into the DPRAM if msg doorbell is available 647 // Only put a message into the DPRAM if msg doorbell is available
648 status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL); 648 status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
649 //DEBUG("FT1000_ft1000_ChIoctl: READ REGISTER tempword=%x\n", tempword); 649 //DEBUG("FT1000_ft1000_ioctl: READ REGISTER tempword=%x\n", tempword);
650 if (tempword & FT1000_DB_DPRAM_TX) { 650 if (tempword & FT1000_DB_DPRAM_TX) {
651 // Suspend for 2ms and try again due to DSP doorbell busy 651 // Suspend for 2ms and try again due to DSP doorbell busy
652 mdelay(2); 652 mdelay(2);
@@ -662,7 +662,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
662 mdelay(3); 662 mdelay(3);
663 status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL); 663 status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_DOORBELL);
664 if (tempword & FT1000_DB_DPRAM_TX) { 664 if (tempword & FT1000_DB_DPRAM_TX) {
665 DEBUG("FT1000:ft1000_ChIoctl:Doorbell not available\n"); 665 DEBUG("FT1000:ft1000_ioctl:Doorbell not available\n");
666 result = -ENOTTY; 666 result = -ENOTTY;
667 kfree(dpram_data); 667 kfree(dpram_data);
668 break; 668 break;
@@ -672,7 +672,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
672 } 672 }
673 } 673 }
674 674
675 //DEBUG("FT1000_ft1000_ChIoctl: finished reading register\n"); 675 //DEBUG("FT1000_ft1000_ioctl: finished reading register\n");
676 676
677 // Make sure we are within the limits of the slow queue memory limitation 677 // Make sure we are within the limits of the slow queue memory limitation
678 if ( (msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ) ) { 678 if ( (msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ) ) {
@@ -719,7 +719,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
719 } 719 }
720 } 720 }
721 else { 721 else {
722 DEBUG("FT1000:ft1000_ChIoctl: Card not ready take messages\n"); 722 DEBUG("FT1000:ft1000_ioctl: Card not ready take messages\n");
723 result = -EACCES; 723 result = -EACCES;
724 } 724 }
725 kfree(dpram_data); 725 kfree(dpram_data);
@@ -732,7 +732,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
732 IOCTL_DPRAM_BLK __user *pioctl_dpram; 732 IOCTL_DPRAM_BLK __user *pioctl_dpram;
733 int msglen; 733 int msglen;
734 734
735 //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_GET_DPRAM called\n"); 735 //DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_GET_DPRAM called\n");
736 736
737 if (ft1000_flarion_cnt == 0) { 737 if (ft1000_flarion_cnt == 0) {
738 return (-EBADF); 738 return (-EBADF);
@@ -740,15 +740,15 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
740 740
741 // Search for matching file object 741 // Search for matching file object
742 for (i=0; i<MAX_NUM_APP; i++) { 742 for (i=0; i<MAX_NUM_APP; i++) {
743 if ( info->app_info[i].fileobject == &File->f_owner) { 743 if ( info->app_info[i].fileobject == &file->f_owner) {
744 //DEBUG("FT1000:ft1000_ChIoctl: Message is for AppId = %d\n", info->app_info[i].app_id); 744 //DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", info->app_info[i].app_id);
745 break; 745 break;
746 } 746 }
747 } 747 }
748 748
749 // Could not find application info block 749 // Could not find application info block
750 if (i == MAX_NUM_APP) { 750 if (i == MAX_NUM_APP) {
751 DEBUG("FT1000:ft1000_ChIoctl:Could not find application info block\n"); 751 DEBUG("FT1000:ft1000_ioctl:Could not find application info block\n");
752 result = -EBADF; 752 result = -EBADF;
753 break; 753 break;
754 } 754 }
@@ -756,22 +756,22 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
756 result = 0; 756 result = 0;
757 pioctl_dpram = argp; 757 pioctl_dpram = argp;
758 if (list_empty(&info->app_info[i].app_sqlist) == 0) { 758 if (list_empty(&info->app_info[i].app_sqlist) == 0) {
759 //DEBUG("FT1000:ft1000_ChIoctl:Message detected in slow queue\n"); 759 //DEBUG("FT1000:ft1000_ioctl:Message detected in slow queue\n");
760 spin_lock_irqsave(&free_buff_lock, flags); 760 spin_lock_irqsave(&free_buff_lock, flags);
761 pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, struct dpram_blk, list); 761 pdpram_blk = list_entry(info->app_info[i].app_sqlist.next, struct dpram_blk, list);
762 list_del(&pdpram_blk->list); 762 list_del(&pdpram_blk->list);
763 info->app_info[i].NumOfMsg--; 763 info->app_info[i].NumOfMsg--;
764 //DEBUG("FT1000:ft1000_ChIoctl:NumOfMsg for app %d = %d\n", i, info->app_info[i].NumOfMsg); 764 //DEBUG("FT1000:ft1000_ioctl:NumOfMsg for app %d = %d\n", i, info->app_info[i].NumOfMsg);
765 spin_unlock_irqrestore(&free_buff_lock, flags); 765 spin_unlock_irqrestore(&free_buff_lock, flags);
766 msglen = ntohs(*(u16 *)pdpram_blk->pbuffer) + PSEUDOSZ; 766 msglen = ntohs(*(u16 *)pdpram_blk->pbuffer) + PSEUDOSZ;
767 result = get_user(msglen, &pioctl_dpram->total_len); 767 result = get_user(msglen, &pioctl_dpram->total_len);
768 if (result) 768 if (result)
769 break; 769 break;
770 msglen = htons(msglen); 770 msglen = htons(msglen);
771 //DEBUG("FT1000:ft1000_ChIoctl:msg length = %x\n", msglen); 771 //DEBUG("FT1000:ft1000_ioctl:msg length = %x\n", msglen);
772 if(copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) 772 if(copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen))
773 { 773 {
774 DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); 774 DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n");
775 result = -EFAULT; 775 result = -EFAULT;
776 break; 776 break;
777 } 777 }
@@ -779,12 +779,12 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
779 ft1000_free_buffer(pdpram_blk, &freercvpool); 779 ft1000_free_buffer(pdpram_blk, &freercvpool);
780 result = msglen; 780 result = msglen;
781 } 781 }
782 //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_GET_DPRAM no message\n"); 782 //DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_GET_DPRAM no message\n");
783 } 783 }
784 break; 784 break;
785 785
786 default: 786 default:
787 DEBUG("FT1000:ft1000_ChIoctl:unknown command: 0x%x\n", Command); 787 DEBUG("FT1000:ft1000_ioctl:unknown command: 0x%x\n", command);
788 result = -ENOTTY; 788 result = -ENOTTY;
789 break; 789 break;
790 } 790 }
@@ -793,7 +793,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
793} 793}
794 794
795//--------------------------------------------------------------------------- 795//---------------------------------------------------------------------------
796// Function: ft1000_ChRelease 796// Function: ft1000_release
797// 797//
798// Parameters: 798// Parameters:
799// 799//
@@ -802,16 +802,16 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command,
802// Notes: 802// Notes:
803// 803//
804//--------------------------------------------------------------------------- 804//---------------------------------------------------------------------------
805static int ft1000_ChRelease (struct inode *Inode, struct file *File) 805static int ft1000_release (struct inode *inode, struct file *file)
806{ 806{
807 struct ft1000_info *info; 807 struct ft1000_info *info;
808 struct net_device *dev; 808 struct net_device *dev;
809 int i; 809 int i;
810 struct dpram_blk *pdpram_blk; 810 struct dpram_blk *pdpram_blk;
811 811
812 DEBUG("ft1000_ChRelease called\n"); 812 DEBUG("ft1000_release called\n");
813 813
814 dev = File->private_data; 814 dev = file->private_data;
815 info = netdev_priv(dev); 815 info = netdev_priv(dev);
816 816
817 if (ft1000_flarion_cnt == 0) { 817 if (ft1000_flarion_cnt == 0) {
@@ -821,8 +821,8 @@ static int ft1000_ChRelease (struct inode *Inode, struct file *File)
821 821
822 // Search for matching file object 822 // Search for matching file object
823 for (i=0; i<MAX_NUM_APP; i++) { 823 for (i=0; i<MAX_NUM_APP; i++) {
824 if ( info->app_info[i].fileobject == &File->f_owner) { 824 if ( info->app_info[i].fileobject == &file->f_owner) {
825 //DEBUG("FT1000:ft1000_ChIoctl: Message is for AppId = %d\n", info->app_info[i].app_id); 825 //DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", info->app_info[i].app_id);
826 break; 826 break;
827 } 827 }
828 } 828 }
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 69f920fdc12a..7456787481c8 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -952,7 +952,7 @@ int reg_ft1000_netdev(struct ft1000_device *ft1000dev, struct usb_interface *int
952 952
953 953
954 //Create character device, implemented by Jim 954 //Create character device, implemented by Jim
955 ft1000_CreateDevice(ft1000dev); 955 ft1000_create_dev(ft1000dev);
956 956
957 DEBUG ("reg_ft1000_netdev returned\n"); 957 DEBUG ("reg_ft1000_netdev returned\n");
958 958
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index d71ac30629f5..7dfed41b02ac 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -231,7 +231,7 @@ static void ft1000_disconnect(struct usb_interface *interface)
231 231
232 if (pft1000info->pFt1000Dev->net) { 232 if (pft1000info->pFt1000Dev->net) {
233 DEBUG("ft1000_disconnect: destroy char driver\n"); 233 DEBUG("ft1000_disconnect: destroy char driver\n");
234 ft1000_DestroyDevice(pft1000info->pFt1000Dev->net); 234 ft1000_destroy_dev(pft1000info->pFt1000Dev->net);
235 unregister_netdev(pft1000info->pFt1000Dev->net); 235 unregister_netdev(pft1000info->pFt1000Dev->net);
236 DEBUG 236 DEBUG
237 ("ft1000_disconnect: network device unregisterd\n"); 237 ("ft1000_disconnect: network device unregisterd\n");
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
index 2c89d14807fb..045ef30b79a1 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.h
@@ -579,8 +579,8 @@ u16 scram_dnldr(struct ft1000_device *ft1000dev, void *pFileStart, u32 FileLeng
579extern struct list_head freercvpool; 579extern struct list_head freercvpool;
580extern spinlock_t free_buff_lock; // lock to arbitrate free buffer list for receive command data 580extern spinlock_t free_buff_lock; // lock to arbitrate free buffer list for receive command data
581 581
582int ft1000_CreateDevice(struct ft1000_device *dev); 582int ft1000_create_dev(struct ft1000_device *dev);
583void ft1000_DestroyDevice(struct net_device *dev); 583void ft1000_destroy_dev(struct net_device *dev);
584extern void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int size); 584extern void CardSendCommand(struct ft1000_device *ft1000dev, void *ptempbuffer, int size);
585 585
586struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist); 586struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist);