aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7720.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-03 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commit441b62c1edb986827154768d89bbac0ba779984f (patch)
tree13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/mos7720.c
parent14722ef4acedc643f0b78b7165ceff2d300dae4d (diff)
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r--drivers/usb/serial/mos7720.c118
1 files changed, 59 insertions, 59 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 2e14fdd08464..74b889bf19cf 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -118,11 +118,11 @@ static void mos7720_interrupt_callback(struct urb *urb)
118 case -ENOENT: 118 case -ENOENT:
119 case -ESHUTDOWN: 119 case -ESHUTDOWN:
120 /* this urb is terminated, clean up */ 120 /* this urb is terminated, clean up */
121 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 121 dbg("%s - urb shutting down with status: %d", __func__,
122 status); 122 status);
123 return; 123 return;
124 default: 124 default:
125 dbg("%s - nonzero urb status received: %d", __FUNCTION__, 125 dbg("%s - nonzero urb status received: %d", __func__,
126 status); 126 status);
127 goto exit; 127 goto exit;
128 } 128 }
@@ -183,7 +183,7 @@ exit:
183 if (result) 183 if (result)
184 dev_err(&urb->dev->dev, 184 dev_err(&urb->dev->dev,
185 "%s - Error %d submitting control urb\n", 185 "%s - Error %d submitting control urb\n",
186 __FUNCTION__, result); 186 __func__, result);
187 return; 187 return;
188} 188}
189 189
@@ -214,7 +214,7 @@ static void mos7720_bulk_in_callback(struct urb *urb)
214 214
215 port = mos7720_port->port; 215 port = mos7720_port->port;
216 216
217 dbg("Entering...%s", __FUNCTION__); 217 dbg("Entering...%s", __func__);
218 218
219 data = urb->transfer_buffer; 219 data = urb->transfer_buffer;
220 220
@@ -362,7 +362,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
362 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 362 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
363 GFP_KERNEL); 363 GFP_KERNEL);
364 if (!urb->transfer_buffer) { 364 if (!urb->transfer_buffer) {
365 err("%s-out of memory for urb buffers.", __FUNCTION__); 365 err("%s-out of memory for urb buffers.", __func__);
366 usb_free_urb(mos7720_port->write_urb_pool[j]); 366 usb_free_urb(mos7720_port->write_urb_pool[j]);
367 mos7720_port->write_urb_pool[j] = NULL; 367 mos7720_port->write_urb_pool[j] = NULL;
368 continue; 368 continue;
@@ -479,7 +479,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
479 if (response) 479 if (response)
480 dev_err(&port->dev, 480 dev_err(&port->dev,
481 "%s - Error %d submitting control urb\n", 481 "%s - Error %d submitting control urb\n",
482 __FUNCTION__, response); 482 __func__, response);
483 } 483 }
484 484
485 /* set up our bulk in urb */ 485 /* set up our bulk in urb */
@@ -492,7 +492,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
492 response = usb_submit_urb(port->read_urb, GFP_KERNEL); 492 response = usb_submit_urb(port->read_urb, GFP_KERNEL);
493 if (response) 493 if (response)
494 dev_err(&port->dev, 494 dev_err(&port->dev,
495 "%s - Error %d submitting read urb\n", __FUNCTION__, response); 495 "%s - Error %d submitting read urb\n", __func__, response);
496 496
497 /* initialize our icount structure */ 497 /* initialize our icount structure */
498 memset(&(mos7720_port->icount), 0x00, sizeof(mos7720_port->icount)); 498 memset(&(mos7720_port->icount), 0x00, sizeof(mos7720_port->icount));
@@ -521,11 +521,11 @@ static int mos7720_chars_in_buffer(struct usb_serial_port *port)
521 int chars = 0; 521 int chars = 0;
522 struct moschip_port *mos7720_port; 522 struct moschip_port *mos7720_port;
523 523
524 dbg("%s:entering ...........", __FUNCTION__); 524 dbg("%s:entering ...........", __func__);
525 525
526 mos7720_port = usb_get_serial_port_data(port); 526 mos7720_port = usb_get_serial_port_data(port);
527 if (mos7720_port == NULL) { 527 if (mos7720_port == NULL) {
528 dbg("%s:leaving ...........", __FUNCTION__); 528 dbg("%s:leaving ...........", __func__);
529 return -ENODEV; 529 return -ENODEV;
530 } 530 }
531 531
@@ -533,7 +533,7 @@ static int mos7720_chars_in_buffer(struct usb_serial_port *port)
533 if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS) 533 if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS)
534 chars += URB_TRANSFER_BUFFER_SIZE; 534 chars += URB_TRANSFER_BUFFER_SIZE;
535 } 535 }
536 dbg("%s - returns %d", __FUNCTION__, chars); 536 dbg("%s - returns %d", __func__, chars);
537 return chars; 537 return chars;
538} 538}
539 539
@@ -585,7 +585,7 @@ static void mos7720_close(struct usb_serial_port *port, struct file *filp)
585 mutex_unlock(&serial->disc_mutex); 585 mutex_unlock(&serial->disc_mutex);
586 mos7720_port->open = 0; 586 mos7720_port->open = 0;
587 587
588 dbg("Leaving %s", __FUNCTION__); 588 dbg("Leaving %s", __func__);
589} 589}
590 590
591static void mos7720_break(struct usb_serial_port *port, int break_state) 591static void mos7720_break(struct usb_serial_port *port, int break_state)
@@ -594,7 +594,7 @@ static void mos7720_break(struct usb_serial_port *port, int break_state)
594 struct usb_serial *serial; 594 struct usb_serial *serial;
595 struct moschip_port *mos7720_port; 595 struct moschip_port *mos7720_port;
596 596
597 dbg("Entering %s", __FUNCTION__); 597 dbg("Entering %s", __func__);
598 598
599 serial = port->serial; 599 serial = port->serial;
600 600
@@ -627,11 +627,11 @@ static int mos7720_write_room(struct usb_serial_port *port)
627 int room = 0; 627 int room = 0;
628 int i; 628 int i;
629 629
630 dbg("%s:entering ...........", __FUNCTION__); 630 dbg("%s:entering ...........", __func__);
631 631
632 mos7720_port = usb_get_serial_port_data(port); 632 mos7720_port = usb_get_serial_port_data(port);
633 if (mos7720_port == NULL) { 633 if (mos7720_port == NULL) {
634 dbg("%s:leaving ...........", __FUNCTION__); 634 dbg("%s:leaving ...........", __func__);
635 return -ENODEV; 635 return -ENODEV;
636 } 636 }
637 637
@@ -640,7 +640,7 @@ static int mos7720_write_room(struct usb_serial_port *port)
640 room += URB_TRANSFER_BUFFER_SIZE; 640 room += URB_TRANSFER_BUFFER_SIZE;
641 } 641 }
642 642
643 dbg("%s - returns %d", __FUNCTION__, room); 643 dbg("%s - returns %d", __func__, room);
644 return room; 644 return room;
645} 645}
646 646
@@ -657,7 +657,7 @@ static int mos7720_write(struct usb_serial_port *port,
657 struct urb *urb; 657 struct urb *urb;
658 const unsigned char *current_position = data; 658 const unsigned char *current_position = data;
659 659
660 dbg("%s:entering ...........", __FUNCTION__); 660 dbg("%s:entering ...........", __func__);
661 661
662 serial = port->serial; 662 serial = port->serial;
663 663
@@ -679,7 +679,7 @@ static int mos7720_write(struct usb_serial_port *port,
679 } 679 }
680 680
681 if (urb == NULL) { 681 if (urb == NULL) {
682 dbg("%s - no more free urbs", __FUNCTION__); 682 dbg("%s - no more free urbs", __func__);
683 goto exit; 683 goto exit;
684 } 684 }
685 685
@@ -687,14 +687,14 @@ static int mos7720_write(struct usb_serial_port *port,
687 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 687 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
688 GFP_KERNEL); 688 GFP_KERNEL);
689 if (urb->transfer_buffer == NULL) { 689 if (urb->transfer_buffer == NULL) {
690 err("%s no more kernel memory...", __FUNCTION__); 690 err("%s no more kernel memory...", __func__);
691 goto exit; 691 goto exit;
692 } 692 }
693 } 693 }
694 transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE); 694 transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE);
695 695
696 memcpy(urb->transfer_buffer, current_position, transfer_size); 696 memcpy(urb->transfer_buffer, current_position, transfer_size);
697 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, 697 usb_serial_debug_data(debug, &port->dev, __func__, transfer_size,
698 urb->transfer_buffer); 698 urb->transfer_buffer);
699 699
700 /* fill urb with data and submit */ 700 /* fill urb with data and submit */
@@ -708,7 +708,7 @@ static int mos7720_write(struct usb_serial_port *port,
708 status = usb_submit_urb(urb,GFP_ATOMIC); 708 status = usb_submit_urb(urb,GFP_ATOMIC);
709 if (status) { 709 if (status) {
710 err("%s - usb_submit_urb(write bulk) failed with status = %d", 710 err("%s - usb_submit_urb(write bulk) failed with status = %d",
711 __FUNCTION__, status); 711 __func__, status);
712 bytes_sent = status; 712 bytes_sent = status;
713 goto exit; 713 goto exit;
714 } 714 }
@@ -724,7 +724,7 @@ static void mos7720_throttle(struct usb_serial_port *port)
724 struct tty_struct *tty; 724 struct tty_struct *tty;
725 int status; 725 int status;
726 726
727 dbg("%s- port %d\n", __FUNCTION__, port->number); 727 dbg("%s- port %d\n", __func__, port->number);
728 728
729 mos7720_port = usb_get_serial_port_data(port); 729 mos7720_port = usb_get_serial_port_data(port);
730 730
@@ -736,11 +736,11 @@ static void mos7720_throttle(struct usb_serial_port *port)
736 return; 736 return;
737 } 737 }
738 738
739 dbg("%s: Entering ..........", __FUNCTION__); 739 dbg("%s: Entering ..........", __func__);
740 740
741 tty = port->tty; 741 tty = port->tty;
742 if (!tty) { 742 if (!tty) {
743 dbg("%s - no tty available", __FUNCTION__); 743 dbg("%s - no tty available", __func__);
744 return; 744 return;
745 } 745 }
746 746
@@ -773,15 +773,15 @@ static void mos7720_unthrottle(struct usb_serial_port *port)
773 return; 773 return;
774 774
775 if (!mos7720_port->open) { 775 if (!mos7720_port->open) {
776 dbg("%s - port not opened", __FUNCTION__); 776 dbg("%s - port not opened", __func__);
777 return; 777 return;
778 } 778 }
779 779
780 dbg("%s: Entering ..........", __FUNCTION__); 780 dbg("%s: Entering ..........", __func__);
781 781
782 tty = port->tty; 782 tty = port->tty;
783 if (!tty) { 783 if (!tty) {
784 dbg("%s - no tty available", __FUNCTION__); 784 dbg("%s - no tty available", __func__);
785 return; 785 return;
786 } 786 }
787 787
@@ -922,7 +922,7 @@ static int calc_baud_rate_divisor(int baudrate, int *divisor)
922 __u16 round; 922 __u16 round;
923 923
924 924
925 dbg("%s - %d", __FUNCTION__, baudrate); 925 dbg("%s - %d", __func__, baudrate);
926 926
927 for (i = 0; i < ARRAY_SIZE(divisor_table); i++) { 927 for (i = 0; i < ARRAY_SIZE(divisor_table); i++) {
928 if (divisor_table[i].baudrate == baudrate) { 928 if (divisor_table[i].baudrate == baudrate) {
@@ -973,15 +973,15 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
973 port = mos7720_port->port; 973 port = mos7720_port->port;
974 serial = port->serial; 974 serial = port->serial;
975 975
976 dbg("%s: Entering ..........", __FUNCTION__); 976 dbg("%s: Entering ..........", __func__);
977 977
978 number = port->number - port->serial->minor; 978 number = port->number - port->serial->minor;
979 dbg("%s - port = %d, baud = %d", __FUNCTION__, port->number, baudrate); 979 dbg("%s - port = %d, baud = %d", __func__, port->number, baudrate);
980 980
981 /* Calculate the Divisor */ 981 /* Calculate the Divisor */
982 status = calc_baud_rate_divisor(baudrate, &divisor); 982 status = calc_baud_rate_divisor(baudrate, &divisor);
983 if (status) { 983 if (status) {
984 err("%s - bad baud rate", __FUNCTION__); 984 err("%s - bad baud rate", __func__);
985 return status; 985 return status;
986 } 986 }
987 987
@@ -1034,16 +1034,16 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1034 serial = port->serial; 1034 serial = port->serial;
1035 port_number = port->number - port->serial->minor; 1035 port_number = port->number - port->serial->minor;
1036 1036
1037 dbg("%s - port %d", __FUNCTION__, port->number); 1037 dbg("%s - port %d", __func__, port->number);
1038 1038
1039 if (!mos7720_port->open) { 1039 if (!mos7720_port->open) {
1040 dbg("%s - port not opened", __FUNCTION__); 1040 dbg("%s - port not opened", __func__);
1041 return; 1041 return;
1042 } 1042 }
1043 1043
1044 tty = mos7720_port->port->tty; 1044 tty = mos7720_port->port->tty;
1045 1045
1046 dbg("%s: Entering ..........", __FUNCTION__); 1046 dbg("%s: Entering ..........", __func__);
1047 1047
1048 lData = UART_LCR_WLEN8; 1048 lData = UART_LCR_WLEN8;
1049 lStop = 0x00; /* 1 stop bit */ 1049 lStop = 0x00; /* 1 stop bit */
@@ -1078,14 +1078,14 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1078 if (cflag & PARENB) { 1078 if (cflag & PARENB) {
1079 if (cflag & PARODD) { 1079 if (cflag & PARODD) {
1080 lParity = UART_LCR_PARITY; 1080 lParity = UART_LCR_PARITY;
1081 dbg("%s - parity = odd", __FUNCTION__); 1081 dbg("%s - parity = odd", __func__);
1082 } else { 1082 } else {
1083 lParity = (UART_LCR_EPAR | UART_LCR_PARITY); 1083 lParity = (UART_LCR_EPAR | UART_LCR_PARITY);
1084 dbg("%s - parity = even", __FUNCTION__); 1084 dbg("%s - parity = even", __func__);
1085 } 1085 }
1086 1086
1087 } else { 1087 } else {
1088 dbg("%s - parity = none", __FUNCTION__); 1088 dbg("%s - parity = none", __func__);
1089 } 1089 }
1090 1090
1091 if (cflag & CMSPAR) 1091 if (cflag & CMSPAR)
@@ -1094,10 +1094,10 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1094 /* Change the Stop bit */ 1094 /* Change the Stop bit */
1095 if (cflag & CSTOPB) { 1095 if (cflag & CSTOPB) {
1096 lStop = UART_LCR_STOP; 1096 lStop = UART_LCR_STOP;
1097 dbg("%s - stop bits = 2", __FUNCTION__); 1097 dbg("%s - stop bits = 2", __func__);
1098 } else { 1098 } else {
1099 lStop = 0x00; 1099 lStop = 0x00;
1100 dbg("%s - stop bits = 1", __FUNCTION__); 1100 dbg("%s - stop bits = 1", __func__);
1101 } 1101 }
1102 1102
1103#define LCR_BITS_MASK 0x03 /* Mask for bits/char field */ 1103#define LCR_BITS_MASK 0x03 /* Mask for bits/char field */
@@ -1171,7 +1171,7 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1171 return; 1171 return;
1172 } 1172 }
1173 1173
1174 dbg("%s - baud rate = %d", __FUNCTION__, baud); 1174 dbg("%s - baud rate = %d", __func__, baud);
1175 status = send_cmd_write_baud_rate(mos7720_port, baud); 1175 status = send_cmd_write_baud_rate(mos7720_port, baud);
1176 /* FIXME: needs to write actual resulting baud back not just 1176 /* FIXME: needs to write actual resulting baud back not just
1177 blindly do so */ 1177 blindly do so */
@@ -1217,7 +1217,7 @@ static void mos7720_set_termios(struct usb_serial_port *port,
1217 1217
1218 1218
1219 if (!mos7720_port->open) { 1219 if (!mos7720_port->open) {
1220 dbg("%s - port not opened", __FUNCTION__); 1220 dbg("%s - port not opened", __func__);
1221 return; 1221 return;
1222 } 1222 }
1223 1223
@@ -1225,15 +1225,15 @@ static void mos7720_set_termios(struct usb_serial_port *port,
1225 1225
1226 cflag = tty->termios->c_cflag; 1226 cflag = tty->termios->c_cflag;
1227 1227
1228 dbg("%s - cflag %08x iflag %08x", __FUNCTION__, 1228 dbg("%s - cflag %08x iflag %08x", __func__,
1229 tty->termios->c_cflag, 1229 tty->termios->c_cflag,
1230 RELEVANT_IFLAG(tty->termios->c_iflag)); 1230 RELEVANT_IFLAG(tty->termios->c_iflag));
1231 1231
1232 dbg("%s - old cflag %08x old iflag %08x", __FUNCTION__, 1232 dbg("%s - old cflag %08x old iflag %08x", __func__,
1233 old_termios->c_cflag, 1233 old_termios->c_cflag,
1234 RELEVANT_IFLAG(old_termios->c_iflag)); 1234 RELEVANT_IFLAG(old_termios->c_iflag));
1235 1235
1236 dbg("%s - port %d", __FUNCTION__, port->number); 1236 dbg("%s - port %d", __func__, port->number);
1237 1237
1238 /* change the port settings to the new ones specified */ 1238 /* change the port settings to the new ones specified */
1239 change_port_settings(mos7720_port, old_termios); 1239 change_port_settings(mos7720_port, old_termios);
@@ -1271,7 +1271,7 @@ static int get_lsr_info(struct moschip_port *mos7720_port,
1271 1271
1272 count = mos7720_chars_in_buffer(mos7720_port->port); 1272 count = mos7720_chars_in_buffer(mos7720_port->port);
1273 if (count == 0) { 1273 if (count == 0) {
1274 dbg("%s -- Empty", __FUNCTION__); 1274 dbg("%s -- Empty", __func__);
1275 result = TIOCSER_TEMT; 1275 result = TIOCSER_TEMT;
1276 } 1276 }
1277 1277
@@ -1296,7 +1296,7 @@ static int get_number_bytes_avail(struct moschip_port *mos7720_port,
1296 1296
1297 result = tty->read_cnt; 1297 result = tty->read_cnt;
1298 1298
1299 dbg("%s(%d) = %d", __FUNCTION__, mos7720_port->port->number, result); 1299 dbg("%s(%d) = %d", __func__, mos7720_port->port->number, result);
1300 if (copy_to_user(value, &result, sizeof(int))) 1300 if (copy_to_user(value, &result, sizeof(int)))
1301 return -EFAULT; 1301 return -EFAULT;
1302 1302
@@ -1374,7 +1374,7 @@ static int get_modem_info(struct moschip_port *mos7720_port,
1374 | ((msr & UART_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ 1374 | ((msr & UART_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
1375 1375
1376 1376
1377 dbg("%s -- %x", __FUNCTION__, result); 1377 dbg("%s -- %x", __func__, result);
1378 1378
1379 if (copy_to_user(value, &result, sizeof(int))) 1379 if (copy_to_user(value, &result, sizeof(int)))
1380 return -EFAULT; 1380 return -EFAULT;
@@ -1418,45 +1418,45 @@ static int mos7720_ioctl(struct usb_serial_port *port, struct file *file,
1418 if (mos7720_port == NULL) 1418 if (mos7720_port == NULL)
1419 return -ENODEV; 1419 return -ENODEV;
1420 1420
1421 dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); 1421 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
1422 1422
1423 switch (cmd) { 1423 switch (cmd) {
1424 case TIOCINQ: 1424 case TIOCINQ:
1425 /* return number of bytes available */ 1425 /* return number of bytes available */
1426 dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number); 1426 dbg("%s (%d) TIOCINQ", __func__, port->number);
1427 return get_number_bytes_avail(mos7720_port, 1427 return get_number_bytes_avail(mos7720_port,
1428 (unsigned int __user *)arg); 1428 (unsigned int __user *)arg);
1429 break; 1429 break;
1430 1430
1431 case TIOCSERGETLSR: 1431 case TIOCSERGETLSR:
1432 dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); 1432 dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
1433 return get_lsr_info(mos7720_port, (unsigned int __user *)arg); 1433 return get_lsr_info(mos7720_port, (unsigned int __user *)arg);
1434 return 0; 1434 return 0;
1435 1435
1436 case TIOCMBIS: 1436 case TIOCMBIS:
1437 case TIOCMBIC: 1437 case TIOCMBIC:
1438 case TIOCMSET: 1438 case TIOCMSET:
1439 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, 1439 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
1440 port->number); 1440 port->number);
1441 return set_modem_info(mos7720_port, cmd, 1441 return set_modem_info(mos7720_port, cmd,
1442 (unsigned int __user *)arg); 1442 (unsigned int __user *)arg);
1443 1443
1444 case TIOCMGET: 1444 case TIOCMGET:
1445 dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number); 1445 dbg("%s (%d) TIOCMGET", __func__, port->number);
1446 return get_modem_info(mos7720_port, 1446 return get_modem_info(mos7720_port,
1447 (unsigned int __user *)arg); 1447 (unsigned int __user *)arg);
1448 1448
1449 case TIOCGSERIAL: 1449 case TIOCGSERIAL:
1450 dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); 1450 dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
1451 return get_serial_info(mos7720_port, 1451 return get_serial_info(mos7720_port,
1452 (struct serial_struct __user *)arg); 1452 (struct serial_struct __user *)arg);
1453 1453
1454 case TIOCSSERIAL: 1454 case TIOCSSERIAL:
1455 dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); 1455 dbg("%s (%d) TIOCSSERIAL", __func__, port->number);
1456 break; 1456 break;
1457 1457
1458 case TIOCMIWAIT: 1458 case TIOCMIWAIT:
1459 dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number); 1459 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
1460 cprev = mos7720_port->icount; 1460 cprev = mos7720_port->icount;
1461 while (1) { 1461 while (1) {
1462 if (signal_pending(current)) 1462 if (signal_pending(current))
@@ -1490,7 +1490,7 @@ static int mos7720_ioctl(struct usb_serial_port *port, struct file *file,
1490 icount.brk = cnow.brk; 1490 icount.brk = cnow.brk;
1491 icount.buf_overrun = cnow.buf_overrun; 1491 icount.buf_overrun = cnow.buf_overrun;
1492 1492
1493 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, 1493 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
1494 port->number, icount.rx, icount.tx ); 1494 port->number, icount.rx, icount.tx );
1495 if (copy_to_user((void __user *)arg, &icount, sizeof(icount))) 1495 if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
1496 return -EFAULT; 1496 return -EFAULT;
@@ -1508,7 +1508,7 @@ static int mos7720_startup(struct usb_serial *serial)
1508 int i; 1508 int i;
1509 char data; 1509 char data;
1510 1510
1511 dbg("%s: Entering ..........", __FUNCTION__); 1511 dbg("%s: Entering ..........", __func__);
1512 1512
1513 if (!serial) { 1513 if (!serial) {
1514 dbg("Invalid Handler"); 1514 dbg("Invalid Handler");
@@ -1520,7 +1520,7 @@ static int mos7720_startup(struct usb_serial *serial)
1520 /* create our private serial structure */ 1520 /* create our private serial structure */
1521 mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL); 1521 mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL);
1522 if (mos7720_serial == NULL) { 1522 if (mos7720_serial == NULL) {
1523 err("%s - Out of memory", __FUNCTION__); 1523 err("%s - Out of memory", __func__);
1524 return -ENOMEM; 1524 return -ENOMEM;
1525 } 1525 }
1526 1526
@@ -1533,7 +1533,7 @@ static int mos7720_startup(struct usb_serial *serial)
1533 for (i = 0; i < serial->num_ports; ++i) { 1533 for (i = 0; i < serial->num_ports; ++i) {
1534 mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); 1534 mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
1535 if (mos7720_port == NULL) { 1535 if (mos7720_port == NULL) {
1536 err("%s - Out of memory", __FUNCTION__); 1536 err("%s - Out of memory", __func__);
1537 usb_set_serial_data(serial, NULL); 1537 usb_set_serial_data(serial, NULL);
1538 kfree(mos7720_serial); 1538 kfree(mos7720_serial);
1539 return -ENOMEM; 1539 return -ENOMEM;
@@ -1617,7 +1617,7 @@ static int __init moschip7720_init(void)
1617{ 1617{
1618 int retval; 1618 int retval;
1619 1619
1620 dbg("%s: Entering ..........", __FUNCTION__); 1620 dbg("%s: Entering ..........", __func__);
1621 1621
1622 /* Register with the usb serial */ 1622 /* Register with the usb serial */
1623 retval = usb_serial_register(&moschip7720_2port_driver); 1623 retval = usb_serial_register(&moschip7720_2port_driver);