aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ipaq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/ipaq.c')
-rw-r--r--drivers/usb/serial/ipaq.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 1711dda0ea6d..c90436ea8060 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -594,13 +594,13 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
594 int i, result = 0; 594 int i, result = 0;
595 int retries = connect_retries; 595 int retries = connect_retries;
596 596
597 dbg("%s - port %d", __FUNCTION__, port->number); 597 dbg("%s - port %d", __func__, port->number);
598 598
599 bytes_in = 0; 599 bytes_in = 0;
600 bytes_out = 0; 600 bytes_out = 0;
601 priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); 601 priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
602 if (priv == NULL) { 602 if (priv == NULL) {
603 err("%s - Out of memory", __FUNCTION__); 603 err("%s - Out of memory", __func__);
604 return -ENOMEM; 604 return -ENOMEM;
605 } 605 }
606 usb_set_serial_port_data(port, priv); 606 usb_set_serial_port_data(port, priv);
@@ -679,7 +679,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
679 } 679 }
680 680
681 if (!retries && result) { 681 if (!retries && result) {
682 err("%s - failed doing control urb, error %d", __FUNCTION__, 682 err("%s - failed doing control urb, error %d", __func__,
683 result); 683 result);
684 goto error; 684 goto error;
685 } 685 }
@@ -692,7 +692,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
692 692
693 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 693 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
694 if (result) { 694 if (result) {
695 err("%s - failed submitting read urb, error %d", __FUNCTION__, result); 695 err("%s - failed submitting read urb, error %d", __func__, result);
696 goto error; 696 goto error;
697 } 697 }
698 698
@@ -700,7 +700,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
700 700
701enomem: 701enomem:
702 result = -ENOMEM; 702 result = -ENOMEM;
703 err("%s - Out of memory", __FUNCTION__); 703 err("%s - Out of memory", __func__);
704error: 704error:
705 ipaq_destroy_lists(port); 705 ipaq_destroy_lists(port);
706 kfree(priv); 706 kfree(priv);
@@ -712,7 +712,7 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp)
712{ 712{
713 struct ipaq_private *priv = usb_get_serial_port_data(port); 713 struct ipaq_private *priv = usb_get_serial_port_data(port);
714 714
715 dbg("%s - port %d", __FUNCTION__, port->number); 715 dbg("%s - port %d", __func__, port->number);
716 716
717 /* 717 /*
718 * shut down bulk read and write 718 * shut down bulk read and write
@@ -735,15 +735,15 @@ static void ipaq_read_bulk_callback(struct urb *urb)
735 int result; 735 int result;
736 int status = urb->status; 736 int status = urb->status;
737 737
738 dbg("%s - port %d", __FUNCTION__, port->number); 738 dbg("%s - port %d", __func__, port->number);
739 739
740 if (status) { 740 if (status) {
741 dbg("%s - nonzero read bulk status received: %d", 741 dbg("%s - nonzero read bulk status received: %d",
742 __FUNCTION__, status); 742 __func__, status);
743 return; 743 return;
744 } 744 }
745 745
746 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 746 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
747 747
748 tty = port->tty; 748 tty = port->tty;
749 if (tty && urb->actual_length) { 749 if (tty && urb->actual_length) {
@@ -760,7 +760,7 @@ static void ipaq_read_bulk_callback(struct urb *urb)
760 ipaq_read_bulk_callback, port); 760 ipaq_read_bulk_callback, port);
761 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 761 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
762 if (result) 762 if (result)
763 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 763 err("%s - failed resubmitting read urb, error %d", __func__, result);
764 return; 764 return;
765} 765}
766 766
@@ -771,7 +771,7 @@ static int ipaq_write(struct usb_serial_port *port, const unsigned char *buf,
771 int bytes_sent = 0; 771 int bytes_sent = 0;
772 int transfer_size; 772 int transfer_size;
773 773
774 dbg("%s - port %d", __FUNCTION__, port->number); 774 dbg("%s - port %d", __func__, port->number);
775 775
776 while (count > 0) { 776 while (count > 0) {
777 transfer_size = min(count, PACKET_SIZE); 777 transfer_size = min(count, PACKET_SIZE);
@@ -796,7 +796,7 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
796 unsigned long flags; 796 unsigned long flags;
797 797
798 if (priv->free_len <= 0) { 798 if (priv->free_len <= 0) {
799 dbg("%s - we're stuffed", __FUNCTION__); 799 dbg("%s - we're stuffed", __func__);
800 return -EAGAIN; 800 return -EAGAIN;
801 } 801 }
802 802
@@ -808,12 +808,12 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
808 } 808 }
809 spin_unlock_irqrestore(&write_list_lock, flags); 809 spin_unlock_irqrestore(&write_list_lock, flags);
810 if (pkt == NULL) { 810 if (pkt == NULL) {
811 dbg("%s - we're stuffed", __FUNCTION__); 811 dbg("%s - we're stuffed", __func__);
812 return -EAGAIN; 812 return -EAGAIN;
813 } 813 }
814 814
815 memcpy(pkt->data, buf, count); 815 memcpy(pkt->data, buf, count);
816 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, pkt->data); 816 usb_serial_debug_data(debug, &port->dev, __func__, count, pkt->data);
817 817
818 pkt->len = count; 818 pkt->len = count;
819 pkt->written = 0; 819 pkt->written = 0;
@@ -826,7 +826,7 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
826 spin_unlock_irqrestore(&write_list_lock, flags); 826 spin_unlock_irqrestore(&write_list_lock, flags);
827 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 827 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
828 if (result) { 828 if (result) {
829 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 829 err("%s - failed submitting write urb, error %d", __func__, result);
830 } 830 }
831 } else { 831 } else {
832 spin_unlock_irqrestore(&write_list_lock, flags); 832 spin_unlock_irqrestore(&write_list_lock, flags);
@@ -875,11 +875,11 @@ static void ipaq_write_bulk_callback(struct urb *urb)
875 int result; 875 int result;
876 int status = urb->status; 876 int status = urb->status;
877 877
878 dbg("%s - port %d", __FUNCTION__, port->number); 878 dbg("%s - port %d", __func__, port->number);
879 879
880 if (status) { 880 if (status) {
881 dbg("%s - nonzero write bulk status received: %d", 881 dbg("%s - nonzero write bulk status received: %d",
882 __FUNCTION__, status); 882 __func__, status);
883 return; 883 return;
884 } 884 }
885 885
@@ -889,7 +889,7 @@ static void ipaq_write_bulk_callback(struct urb *urb)
889 spin_unlock_irqrestore(&write_list_lock, flags); 889 spin_unlock_irqrestore(&write_list_lock, flags);
890 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 890 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
891 if (result) { 891 if (result) {
892 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 892 err("%s - failed submitting write urb, error %d", __func__, result);
893 } 893 }
894 } else { 894 } else {
895 priv->active = 0; 895 priv->active = 0;
@@ -903,7 +903,7 @@ static int ipaq_write_room(struct usb_serial_port *port)
903{ 903{
904 struct ipaq_private *priv = usb_get_serial_port_data(port); 904 struct ipaq_private *priv = usb_get_serial_port_data(port);
905 905
906 dbg("%s - freelen %d", __FUNCTION__, priv->free_len); 906 dbg("%s - freelen %d", __func__, priv->free_len);
907 return priv->free_len; 907 return priv->free_len;
908} 908}
909 909
@@ -911,7 +911,7 @@ static int ipaq_chars_in_buffer(struct usb_serial_port *port)
911{ 911{
912 struct ipaq_private *priv = usb_get_serial_port_data(port); 912 struct ipaq_private *priv = usb_get_serial_port_data(port);
913 913
914 dbg("%s - queuelen %d", __FUNCTION__, priv->queue_len); 914 dbg("%s - queuelen %d", __func__, priv->queue_len);
915 return priv->queue_len; 915 return priv->queue_len;
916} 916}
917 917
@@ -933,7 +933,7 @@ static void ipaq_destroy_lists(struct usb_serial_port *port)
933 933
934static int ipaq_startup(struct usb_serial *serial) 934static int ipaq_startup(struct usb_serial *serial)
935{ 935{
936 dbg("%s", __FUNCTION__); 936 dbg("%s", __func__);
937 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { 937 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
938 err("active config #%d != 1 ??", 938 err("active config #%d != 1 ??",
939 serial->dev->actconfig->desc.bConfigurationValue); 939 serial->dev->actconfig->desc.bConfigurationValue);
@@ -944,7 +944,7 @@ static int ipaq_startup(struct usb_serial *serial)
944 944
945static void ipaq_shutdown(struct usb_serial *serial) 945static void ipaq_shutdown(struct usb_serial *serial)
946{ 946{
947 dbg("%s", __FUNCTION__); 947 dbg("%s", __func__);
948} 948}
949 949
950static int __init ipaq_init(void) 950static int __init ipaq_init(void)