aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/kl5kusb105.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/kl5kusb105.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/kl5kusb105.c')
-rw-r--r--drivers/usb/serial/kl5kusb105.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index d71004283904..160e19263e25 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -191,7 +191,7 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port,
191 if (rc < 0) 191 if (rc < 0)
192 err("Change port settings failed (error = %d)", rc); 192 err("Change port settings failed (error = %d)", rc);
193 info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d", 193 info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
194 __FUNCTION__, 194 __func__,
195 settings->pktlen, 195 settings->pktlen,
196 settings->baudrate, settings->databits, 196 settings->baudrate, settings->databits,
197 settings->unknown1, settings->unknown2); 197 settings->unknown1, settings->unknown2);
@@ -222,7 +222,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
222 __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1}; 222 __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
223 __u16 status; 223 __u16 status;
224 224
225 info("%s - sending SIO Poll request", __FUNCTION__); 225 info("%s - sending SIO Poll request", __func__);
226 rc = usb_control_msg(port->serial->dev, 226 rc = usb_control_msg(port->serial->dev,
227 usb_rcvctrlpipe(port->serial->dev, 0), 227 usb_rcvctrlpipe(port->serial->dev, 0),
228 KL5KUSB105A_SIO_POLL, 228 KL5KUSB105A_SIO_POLL,
@@ -237,7 +237,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
237 else { 237 else {
238 status = le16_to_cpu(*(u16 *)status_buf); 238 status = le16_to_cpu(*(u16 *)status_buf);
239 239
240 info("%s - read status %x %x", __FUNCTION__, 240 info("%s - read status %x %x", __func__,
241 status_buf[0], status_buf[1]); 241 status_buf[0], status_buf[1]);
242 242
243 *line_state_p = klsi_105_status2linestate(status); 243 *line_state_p = klsi_105_status2linestate(status);
@@ -265,7 +265,7 @@ static int klsi_105_startup (struct usb_serial *serial)
265 priv = kmalloc(sizeof(struct klsi_105_private), 265 priv = kmalloc(sizeof(struct klsi_105_private),
266 GFP_KERNEL); 266 GFP_KERNEL);
267 if (!priv) { 267 if (!priv) {
268 dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__); 268 dbg("%skmalloc for klsi_105_private failed.", __func__);
269 i--; 269 i--;
270 goto err_cleanup; 270 goto err_cleanup;
271 } 271 }
@@ -295,7 +295,7 @@ static int klsi_105_startup (struct usb_serial *serial)
295 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, 295 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
296 GFP_KERNEL); 296 GFP_KERNEL);
297 if (!urb->transfer_buffer) { 297 if (!urb->transfer_buffer) {
298 err("%s - out of memory for urb buffers.", __FUNCTION__); 298 err("%s - out of memory for urb buffers.", __func__);
299 goto err_cleanup; 299 goto err_cleanup;
300 } 300 }
301 } 301 }
@@ -325,7 +325,7 @@ static void klsi_105_shutdown (struct usb_serial *serial)
325{ 325{
326 int i; 326 int i;
327 327
328 dbg("%s", __FUNCTION__); 328 dbg("%s", __func__);
329 329
330 /* stop reads and writes on all ports */ 330 /* stop reads and writes on all ports */
331 for (i=0; i < serial->num_ports; ++i) { 331 for (i=0; i < serial->num_ports; ++i) {
@@ -370,7 +370,7 @@ static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
370 struct klsi_105_port_settings cfg; 370 struct klsi_105_port_settings cfg;
371 unsigned long flags; 371 unsigned long flags;
372 372
373 dbg("%s port %d", __FUNCTION__, port->number); 373 dbg("%s port %d", __func__, port->number);
374 374
375 /* force low_latency on so that our tty_push actually forces 375 /* force low_latency on so that our tty_push actually forces
376 * the data through 376 * the data through
@@ -416,7 +416,7 @@ static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
416 416
417 rc = usb_submit_urb(port->read_urb, GFP_KERNEL); 417 rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
418 if (rc) { 418 if (rc) {
419 err("%s - failed submitting read urb, error %d", __FUNCTION__, rc); 419 err("%s - failed submitting read urb, error %d", __func__, rc);
420 retval = rc; 420 retval = rc;
421 goto exit; 421 goto exit;
422 } 422 }
@@ -434,14 +434,14 @@ static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
434 err("Enabling read failed (error = %d)", rc); 434 err("Enabling read failed (error = %d)", rc);
435 retval = rc; 435 retval = rc;
436 } else 436 } else
437 dbg("%s - enabled reading", __FUNCTION__); 437 dbg("%s - enabled reading", __func__);
438 438
439 rc = klsi_105_get_line_state(port, &line_state); 439 rc = klsi_105_get_line_state(port, &line_state);
440 if (rc >= 0) { 440 if (rc >= 0) {
441 spin_lock_irqsave (&priv->lock, flags); 441 spin_lock_irqsave (&priv->lock, flags);
442 priv->line_state = line_state; 442 priv->line_state = line_state;
443 spin_unlock_irqrestore (&priv->lock, flags); 443 spin_unlock_irqrestore (&priv->lock, flags);
444 dbg("%s - read line state 0x%lx", __FUNCTION__, line_state); 444 dbg("%s - read line state 0x%lx", __func__, line_state);
445 retval = 0; 445 retval = 0;
446 } else 446 } else
447 retval = rc; 447 retval = rc;
@@ -456,7 +456,7 @@ static void klsi_105_close (struct usb_serial_port *port, struct file *filp)
456 struct klsi_105_private *priv = usb_get_serial_port_data(port); 456 struct klsi_105_private *priv = usb_get_serial_port_data(port);
457 int rc; 457 int rc;
458 458
459 dbg("%s port %d", __FUNCTION__, port->number); 459 dbg("%s port %d", __func__, port->number);
460 460
461 mutex_lock(&port->serial->disc_mutex); 461 mutex_lock(&port->serial->disc_mutex);
462 if (!port->serial->disconnected) { 462 if (!port->serial->disconnected) {
@@ -499,7 +499,7 @@ static int klsi_105_write (struct usb_serial_port *port,
499 int result, size; 499 int result, size;
500 int bytes_sent=0; 500 int bytes_sent=0;
501 501
502 dbg("%s - port %d", __FUNCTION__, port->number); 502 dbg("%s - port %d", __func__, port->number);
503 503
504 while (count > 0) { 504 while (count > 0) {
505 /* try to find a free urb (write 0 bytes if none) */ 505 /* try to find a free urb (write 0 bytes if none) */
@@ -511,21 +511,21 @@ static int klsi_105_write (struct usb_serial_port *port,
511 for (i=0; i<NUM_URBS; i++) { 511 for (i=0; i<NUM_URBS; i++) {
512 if (priv->write_urb_pool[i]->status != -EINPROGRESS) { 512 if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
513 urb = priv->write_urb_pool[i]; 513 urb = priv->write_urb_pool[i];
514 dbg("%s - using pool URB %d", __FUNCTION__, i); 514 dbg("%s - using pool URB %d", __func__, i);
515 break; 515 break;
516 } 516 }
517 } 517 }
518 spin_unlock_irqrestore (&priv->lock, flags); 518 spin_unlock_irqrestore (&priv->lock, flags);
519 519
520 if (urb==NULL) { 520 if (urb==NULL) {
521 dbg("%s - no more free urbs", __FUNCTION__); 521 dbg("%s - no more free urbs", __func__);
522 goto exit; 522 goto exit;
523 } 523 }
524 524
525 if (urb->transfer_buffer == NULL) { 525 if (urb->transfer_buffer == NULL) {
526 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC); 526 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
527 if (urb->transfer_buffer == NULL) { 527 if (urb->transfer_buffer == NULL) {
528 err("%s - no more kernel memory...", __FUNCTION__); 528 err("%s - no more kernel memory...", __func__);
529 goto exit; 529 goto exit;
530 } 530 }
531 } 531 }
@@ -551,7 +551,7 @@ static int klsi_105_write (struct usb_serial_port *port,
551 /* send the data out the bulk port */ 551 /* send the data out the bulk port */
552 result = usb_submit_urb(urb, GFP_ATOMIC); 552 result = usb_submit_urb(urb, GFP_ATOMIC);
553 if (result) { 553 if (result) {
554 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 554 err("%s - failed submitting write urb, error %d", __func__, result);
555 goto exit; 555 goto exit;
556 } 556 }
557 buf += size; 557 buf += size;
@@ -570,10 +570,10 @@ static void klsi_105_write_bulk_callback ( struct urb *urb)
570 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 570 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
571 int status = urb->status; 571 int status = urb->status;
572 572
573 dbg("%s - port %d", __FUNCTION__, port->number); 573 dbg("%s - port %d", __func__, port->number);
574 574
575 if (status) { 575 if (status) {
576 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, 576 dbg("%s - nonzero write bulk status received: %d", __func__,
577 status); 577 status);
578 return; 578 return;
579 } 579 }
@@ -600,7 +600,7 @@ static int klsi_105_chars_in_buffer (struct usb_serial_port *port)
600 600
601 spin_unlock_irqrestore (&priv->lock, flags); 601 spin_unlock_irqrestore (&priv->lock, flags);
602 602
603 dbg("%s - returns %d", __FUNCTION__, chars); 603 dbg("%s - returns %d", __func__, chars);
604 return (chars); 604 return (chars);
605} 605}
606 606
@@ -620,7 +620,7 @@ static int klsi_105_write_room (struct usb_serial_port *port)
620 620
621 spin_unlock_irqrestore (&priv->lock, flags); 621 spin_unlock_irqrestore (&priv->lock, flags);
622 622
623 dbg("%s - returns %d", __FUNCTION__, room); 623 dbg("%s - returns %d", __func__, room);
624 return (room); 624 return (room);
625} 625}
626 626
@@ -635,11 +635,11 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
635 int rc; 635 int rc;
636 int status = urb->status; 636 int status = urb->status;
637 637
638 dbg("%s - port %d", __FUNCTION__, port->number); 638 dbg("%s - port %d", __func__, port->number);
639 639
640 /* The urb might have been killed. */ 640 /* The urb might have been killed. */
641 if (status) { 641 if (status) {
642 dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, 642 dbg("%s - nonzero read bulk status received: %d", __func__,
643 status); 643 status);
644 return; 644 return;
645 } 645 }
@@ -649,12 +649,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
649 */ 649 */
650 if (urb->actual_length == 0) { 650 if (urb->actual_length == 0) {
651 /* empty urbs seem to happen, we ignore them */ 651 /* empty urbs seem to happen, we ignore them */
652 /* dbg("%s - emtpy URB", __FUNCTION__); */ 652 /* dbg("%s - emtpy URB", __func__); */
653 ; 653 ;
654 } else if (urb->actual_length <= 2) { 654 } else if (urb->actual_length <= 2) {
655 dbg("%s - size %d URB not understood", __FUNCTION__, 655 dbg("%s - size %d URB not understood", __func__,
656 urb->actual_length); 656 urb->actual_length);
657 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 657 usb_serial_debug_data(debug, &port->dev, __func__,
658 urb->actual_length, data); 658 urb->actual_length, data);
659 } else { 659 } else {
660 int bytes_sent = ((__u8 *) data)[0] + 660 int bytes_sent = ((__u8 *) data)[0] +
@@ -666,12 +666,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
666 * intermixed tty_flip_buffer_push()s 666 * intermixed tty_flip_buffer_push()s
667 * FIXME 667 * FIXME
668 */ 668 */
669 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 669 usb_serial_debug_data(debug, &port->dev, __func__,
670 urb->actual_length, data); 670 urb->actual_length, data);
671 671
672 if (bytes_sent + 2 > urb->actual_length) { 672 if (bytes_sent + 2 > urb->actual_length) {
673 dbg("%s - trying to read more data than available" 673 dbg("%s - trying to read more data than available"
674 " (%d vs. %d)", __FUNCTION__, 674 " (%d vs. %d)", __func__,
675 bytes_sent+2, urb->actual_length); 675 bytes_sent+2, urb->actual_length);
676 /* cap at implied limit */ 676 /* cap at implied limit */
677 bytes_sent = urb->actual_length - 2; 677 bytes_sent = urb->actual_length - 2;
@@ -694,7 +694,7 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
694 port); 694 port);
695 rc = usb_submit_urb(port->read_urb, GFP_ATOMIC); 695 rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
696 if (rc) 696 if (rc)
697 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc); 697 err("%s - failed resubmitting read urb, error %d", __func__, rc);
698} /* klsi_105_read_bulk_callback */ 698} /* klsi_105_read_bulk_callback */
699 699
700 700
@@ -718,7 +718,7 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
718 if( (cflag & CBAUD) != (old_cflag & CBAUD) ) { 718 if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
719 /* reassert DTR and (maybe) RTS on transition from B0 */ 719 /* reassert DTR and (maybe) RTS on transition from B0 */
720 if( (old_cflag & CBAUD) == B0 ) { 720 if( (old_cflag & CBAUD) == B0 ) {
721 dbg("%s: baud was B0", __FUNCTION__); 721 dbg("%s: baud was B0", __func__);
722#if 0 722#if 0
723 priv->control_state |= TIOCM_DTR; 723 priv->control_state |= TIOCM_DTR;
724 /* don't set RTS if using hardware flow control */ 724 /* don't set RTS if using hardware flow control */
@@ -764,7 +764,7 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
764 break; 764 break;
765 } 765 }
766 if ((cflag & CBAUD) == B0 ) { 766 if ((cflag & CBAUD) == B0 ) {
767 dbg("%s: baud is B0", __FUNCTION__); 767 dbg("%s: baud is B0", __func__);
768 /* Drop RTS and DTR */ 768 /* Drop RTS and DTR */
769 /* maybe this should be simulated by sending read 769 /* maybe this should be simulated by sending read
770 * disable and read enable messages? 770 * disable and read enable messages?
@@ -781,11 +781,11 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
781 /* set the number of data bits */ 781 /* set the number of data bits */
782 switch (cflag & CSIZE) { 782 switch (cflag & CSIZE) {
783 case CS5: 783 case CS5:
784 dbg("%s - 5 bits/byte not supported", __FUNCTION__); 784 dbg("%s - 5 bits/byte not supported", __func__);
785 spin_unlock_irqrestore (&priv->lock, flags); 785 spin_unlock_irqrestore (&priv->lock, flags);
786 return ; 786 return ;
787 case CS6: 787 case CS6:
788 dbg("%s - 6 bits/byte not supported", __FUNCTION__); 788 dbg("%s - 6 bits/byte not supported", __func__);
789 spin_unlock_irqrestore (&priv->lock, flags); 789 spin_unlock_irqrestore (&priv->lock, flags);
790 return ; 790 return ;
791 case CS7: 791 case CS7:
@@ -859,7 +859,7 @@ static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
859 struct mct_u232_private *priv = (struct mct_u232_private *)port->private; 859 struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
860 unsigned char lcr = priv->last_lcr; 860 unsigned char lcr = priv->last_lcr;
861 861
862 dbg("%sstate=%d", __FUNCTION__, break_state); 862 dbg("%sstate=%d", __func__, break_state);
863 863
864 if (break_state) 864 if (break_state)
865 lcr |= MCT_U232_SET_BREAK; 865 lcr |= MCT_U232_SET_BREAK;
@@ -874,7 +874,7 @@ static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
874 unsigned long flags; 874 unsigned long flags;
875 int rc; 875 int rc;
876 unsigned long line_state; 876 unsigned long line_state;
877 dbg("%s - request, just guessing", __FUNCTION__); 877 dbg("%s - request, just guessing", __func__);
878 878
879 rc = klsi_105_get_line_state(port, &line_state); 879 rc = klsi_105_get_line_state(port, &line_state);
880 if (rc < 0) { 880 if (rc < 0) {
@@ -886,7 +886,7 @@ static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
886 spin_lock_irqsave (&priv->lock, flags); 886 spin_lock_irqsave (&priv->lock, flags);
887 priv->line_state = line_state; 887 priv->line_state = line_state;
888 spin_unlock_irqrestore (&priv->lock, flags); 888 spin_unlock_irqrestore (&priv->lock, flags);
889 dbg("%s - read line state 0x%lx", __FUNCTION__, line_state); 889 dbg("%s - read line state 0x%lx", __func__, line_state);
890 return (int)line_state; 890 return (int)line_state;
891} 891}
892 892
@@ -895,7 +895,7 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
895{ 895{
896 int retval = -EINVAL; 896 int retval = -EINVAL;
897 897
898 dbg("%s", __FUNCTION__); 898 dbg("%s", __func__);
899 899
900/* if this ever gets implemented, it should be done something like this: 900/* if this ever gets implemented, it should be done something like this:
901 struct usb_serial *serial = port->serial; 901 struct usb_serial *serial = port->serial;
@@ -921,7 +921,7 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
921 921
922static void klsi_105_throttle (struct usb_serial_port *port) 922static void klsi_105_throttle (struct usb_serial_port *port)
923{ 923{
924 dbg("%s - port %d", __FUNCTION__, port->number); 924 dbg("%s - port %d", __func__, port->number);
925 usb_kill_urb(port->read_urb); 925 usb_kill_urb(port->read_urb);
926} 926}
927 927
@@ -929,12 +929,12 @@ static void klsi_105_unthrottle (struct usb_serial_port *port)
929{ 929{
930 int result; 930 int result;
931 931
932 dbg("%s - port %d", __FUNCTION__, port->number); 932 dbg("%s - port %d", __func__, port->number);
933 933
934 port->read_urb->dev = port->serial->dev; 934 port->read_urb->dev = port->serial->dev;
935 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 935 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
936 if (result) 936 if (result)
937 err("%s - failed submitting read urb, error %d", __FUNCTION__, 937 err("%s - failed submitting read urb, error %d", __func__,
938 result); 938 result);
939} 939}
940 940