USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ
[pandora-kernel.git] / drivers / usb / serial / iuu_phoenix.c
index 99b97c0..418a4e3 100644 (file)
@@ -112,7 +112,12 @@ static int iuu_alloc_buf(struct iuu_private *priv)
 
 static int iuu_startup(struct usb_serial *serial)
 {
+       unsigned char num_ports = serial->num_ports;
        struct iuu_private *priv;
+
+       if (serial->num_bulk_in < num_ports || serial->num_bulk_out < num_ports)
+               return -ENODEV;
+
        priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL);
        dbg("%s- priv allocation success", __func__);
        if (!priv)
@@ -150,7 +155,7 @@ static void iuu_release(struct usb_serial *serial)
        }
 }
 
-static int iuu_tiocmset(struct tty_struct *tty, struct file *file,
+static int iuu_tiocmset(struct tty_struct *tty,
                        unsigned int set, unsigned int clear)
 {
        struct usb_serial_port *port = tty->driver_data;
@@ -179,7 +184,7 @@ static int iuu_tiocmset(struct tty_struct *tty, struct file *file,
  * When no card , the reader respond with TIOCM_CD
  * This is known as CD autodetect mechanism
  */
-static int iuu_tiocmget(struct tty_struct *tty, struct file *file)
+static int iuu_tiocmget(struct tty_struct *tty)
 {
        struct usb_serial_port *port = tty->driver_data;
        struct iuu_private *priv = usb_get_serial_port_data(port);
@@ -327,7 +332,7 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
            usb_bulk_msg(serial->dev,
                         usb_sndbulkpipe(serial->dev,
                                         port->bulk_out_endpointAddress), buf,
-                        count, &actual, HZ * 1);
+                        count, &actual, 1000);
 
        if (status != IUU_OPERATION_OK)
                dbg("%s - error = %2x", __func__, status);
@@ -350,7 +355,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
            usb_bulk_msg(serial->dev,
                         usb_rcvbulkpipe(serial->dev,
                                         port->bulk_in_endpointAddress), buf,
-                        count, &actual, HZ * 1);
+                        count, &actual, 1000);
 
        if (status != IUU_OPERATION_OK)
                dbg("%s - error = %2x", __func__, status);