]> err.no Git - linux-2.6/blobdiff - drivers/usb/serial/pl2303.c
[PATCH] USB Serial: move old changelog comments out of source code
[linux-2.6] / drivers / usb / serial / pl2303.c
index 7eab5d4cf3a8c674a84ebafd73c8e4aaa4e2da27..29719ceab19a66993033a3837621fd1180c3cbe4 100644 (file)
@@ -8,31 +8,10 @@
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
+ *     the Free Software Foundation; either version 2 of the License.
  *
  * See Documentation/usb/usb-serial.txt for more information on using this driver
  *
- * 2002_Mar_26 gkh
- *     allowed driver to work properly if there is no tty assigned to a port
- *     (this happens for serial console devices.)
- *
- * 2001_Oct_06 gkh
- *     Added RTS and DTR line control.  Thanks to joe@bndlg.de for parts of it.
- *
- * 2001_Sep_19 gkh
- *     Added break support.
- *
- * 2001_Aug_30 gkh
- *     fixed oops in write_bulk_callback.
- *
- * 2001_Aug_28 gkh
- *     reworked buffer logic to be like other usb-serial drivers.  Hopefully
- *     removing some reported problems.
- *
- * 2001_Jun_06 gkh
- *     finished porting to 2.4 format.
- * 
  */
 
 #include <linux/config.h>
@@ -95,6 +74,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) },
        { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) },
        { USB_DEVICE(SYNTECH_VENDOR_ID, SYNTECH_PRODUCT_ID) },
+       { USB_DEVICE( NOKIA_CA42_VENDOR_ID, NOKIA_CA42_PRODUCT_ID ) },
        { }                                     /* Terminating entry */
 };
 
@@ -174,8 +154,10 @@ static unsigned int pl2303_buf_get(struct pl2303_buf *pb, char *buf,
 
 
 /* All of the device info needed for the PL2303 SIO serial converter */
-static struct usb_serial_device_type pl2303_device = {
-       .owner =                THIS_MODULE,
+static struct usb_serial_driver pl2303_device = {
+       .driver = {
+               .owner =        THIS_MODULE,
+       },
        .name =                 "PL-2303",
        .id_table =             id_table,
        .num_interrupt_in =     NUM_DONT_CARE,
@@ -538,8 +520,10 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
 
        dbg("%s -  port %d", __FUNCTION__, port->number);
 
-       usb_clear_halt(serial->dev, port->write_urb->pipe);
-       usb_clear_halt(serial->dev, port->read_urb->pipe);
+       if (priv->type != HX) {
+               usb_clear_halt(serial->dev, port->write_urb->pipe);
+               usb_clear_halt(serial->dev, port->read_urb->pipe);
+       }
 
        buf = kmalloc(10, GFP_KERNEL);
        if (buf==NULL)
@@ -650,8 +634,7 @@ static void pl2303_close (struct usb_serial_port *port, struct file *filp)
                timeout = max((HZ*2560)/bps,HZ/10);
        else
                timeout = 2*HZ;
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(timeout);
+       schedule_timeout_interruptible(timeout);
 
        /* shutdown our urbs */
        dbg("%s - shutting down urbs", __FUNCTION__);