diff options
Diffstat (limited to 'drivers/usb/serial/ipaq.c')
-rw-r--r-- | drivers/usb/serial/ipaq.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 2affa9c118b2..132be74d2b89 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -608,7 +608,7 @@ static int ipaq_open(struct tty_struct *tty, | |||
608 | bytes_out = 0; | 608 | bytes_out = 0; |
609 | priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); | 609 | priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); |
610 | if (priv == NULL) { | 610 | if (priv == NULL) { |
611 | err("%s - Out of memory", __func__); | 611 | dev_err(&port->dev, "%s - Out of memory\n", __func__); |
612 | return -ENOMEM; | 612 | return -ENOMEM; |
613 | } | 613 | } |
614 | usb_set_serial_port_data(port, priv); | 614 | usb_set_serial_port_data(port, priv); |
@@ -693,8 +693,7 @@ static int ipaq_open(struct tty_struct *tty, | |||
693 | } | 693 | } |
694 | 694 | ||
695 | if (!retries && result) { | 695 | if (!retries && result) { |
696 | err("%s - failed doing control urb, error %d", __func__, | 696 | dev_err(&port->dev, "%s - failed doing control urb, error %d\n", __func__, result); |
697 | result); | ||
698 | goto error; | 697 | goto error; |
699 | } | 698 | } |
700 | 699 | ||
@@ -707,8 +706,9 @@ static int ipaq_open(struct tty_struct *tty, | |||
707 | 706 | ||
708 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); | 707 | result = usb_submit_urb(port->read_urb, GFP_KERNEL); |
709 | if (result) { | 708 | if (result) { |
710 | err("%s - failed submitting read urb, error %d", | 709 | dev_err(&port->dev, |
711 | __func__, result); | 710 | "%s - failed submitting read urb, error %d\n", |
711 | __func__, result); | ||
712 | goto error; | 712 | goto error; |
713 | } | 713 | } |
714 | 714 | ||
@@ -716,7 +716,7 @@ static int ipaq_open(struct tty_struct *tty, | |||
716 | 716 | ||
717 | enomem: | 717 | enomem: |
718 | result = -ENOMEM; | 718 | result = -ENOMEM; |
719 | err("%s - Out of memory", __func__); | 719 | dev_err(&port->dev, "%s - Out of memory\n", __func__); |
720 | error: | 720 | error: |
721 | ipaq_destroy_lists(port); | 721 | ipaq_destroy_lists(port); |
722 | kfree(priv); | 722 | kfree(priv); |
@@ -781,8 +781,9 @@ static void ipaq_read_bulk_callback(struct urb *urb) | |||
781 | ipaq_read_bulk_callback, port); | 781 | ipaq_read_bulk_callback, port); |
782 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 782 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); |
783 | if (result) | 783 | if (result) |
784 | err("%s - failed resubmitting read urb, error %d", | 784 | dev_err(&port->dev, |
785 | __func__, result); | 785 | "%s - failed resubmitting read urb, error %d\n", |
786 | __func__, result); | ||
786 | return; | 787 | return; |
787 | } | 788 | } |
788 | 789 | ||
@@ -847,7 +848,8 @@ static int ipaq_write_bulk(struct usb_serial_port *port, | |||
847 | spin_unlock_irqrestore(&write_list_lock, flags); | 848 | spin_unlock_irqrestore(&write_list_lock, flags); |
848 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 849 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
849 | if (result) | 850 | if (result) |
850 | err("%s - failed submitting write urb, error %d", | 851 | dev_err(&port->dev, |
852 | "%s - failed submitting write urb, error %d\n", | ||
851 | __func__, result); | 853 | __func__, result); |
852 | } else { | 854 | } else { |
853 | spin_unlock_irqrestore(&write_list_lock, flags); | 855 | spin_unlock_irqrestore(&write_list_lock, flags); |
@@ -909,8 +911,9 @@ static void ipaq_write_bulk_callback(struct urb *urb) | |||
909 | spin_unlock_irqrestore(&write_list_lock, flags); | 911 | spin_unlock_irqrestore(&write_list_lock, flags); |
910 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); | 912 | result = usb_submit_urb(port->write_urb, GFP_ATOMIC); |
911 | if (result) | 913 | if (result) |
912 | err("%s - failed submitting write urb, error %d", | 914 | dev_err(&port->dev, |
913 | __func__, result); | 915 | "%s - failed submitting write urb, error %d\n", |
916 | __func__, result); | ||
914 | } else { | 917 | } else { |
915 | priv->active = 0; | 918 | priv->active = 0; |
916 | spin_unlock_irqrestore(&write_list_lock, flags); | 919 | spin_unlock_irqrestore(&write_list_lock, flags); |
@@ -957,7 +960,7 @@ static int ipaq_startup(struct usb_serial *serial) | |||
957 | { | 960 | { |
958 | dbg("%s", __func__); | 961 | dbg("%s", __func__); |
959 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { | 962 | if (serial->dev->actconfig->desc.bConfigurationValue != 1) { |
960 | err("active config #%d != 1 ??", | 963 | dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", |
961 | serial->dev->actconfig->desc.bConfigurationValue); | 964 | serial->dev->actconfig->desc.bConfigurationValue); |
962 | return -ENODEV; | 965 | return -ENODEV; |
963 | } | 966 | } |
@@ -976,7 +979,6 @@ static int __init ipaq_init(void) | |||
976 | retval = usb_serial_register(&ipaq_device); | 979 | retval = usb_serial_register(&ipaq_device); |
977 | if (retval) | 980 | if (retval) |
978 | goto failed_usb_serial_register; | 981 | goto failed_usb_serial_register; |
979 | info(DRIVER_DESC " " DRIVER_VERSION); | ||
980 | if (vendor) { | 982 | if (vendor) { |
981 | ipaq_id_table[0].idVendor = vendor; | 983 | ipaq_id_table[0].idVendor = vendor; |
982 | ipaq_id_table[0].idProduct = product; | 984 | ipaq_id_table[0].idProduct = product; |
@@ -985,6 +987,8 @@ static int __init ipaq_init(void) | |||
985 | if (retval) | 987 | if (retval) |
986 | goto failed_usb_register; | 988 | goto failed_usb_register; |
987 | 989 | ||
990 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
991 | DRIVER_DESC "\n"); | ||
988 | return 0; | 992 | return 0; |
989 | failed_usb_register: | 993 | failed_usb_register: |
990 | usb_serial_deregister(&ipaq_device); | 994 | usb_serial_deregister(&ipaq_device); |