]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/cypress_m8.c
Pull asus into release branch
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / cypress_m8.c
index 45cdf9bc43b2bd01ae9daa5bb10f8949386a1cce..163386336a5daa76852eda408974ace308bf2176 100644 (file)
@@ -193,6 +193,7 @@ static struct usb_serial_driver cypress_earthmate_device = {
                .name =                 "earthmate",
        },
        .description =                  "DeLorme Earthmate USB",
+       .usb_driver =                   &cypress_driver,
        .id_table =                     id_table_earthmate,
        .num_interrupt_in =             1,
        .num_interrupt_out =            1,
@@ -222,6 +223,7 @@ static struct usb_serial_driver cypress_hidcom_device = {
                .name =                 "cyphidcom",
        },
        .description =                  "HID->COM RS232 Adapter",
+       .usb_driver =                   &cypress_driver,
        .id_table =                     id_table_cyphidcomrs232,
        .num_interrupt_in =             1,
        .num_interrupt_out =            1,
@@ -251,6 +253,7 @@ static struct usb_serial_driver cypress_ca42v2_device = {
                 .name =                        "nokiaca42v2",
        },
        .description =                  "Nokia CA-42 V2 Adapter",
+       .usb_driver =                   &cypress_driver,
        .id_table =                     id_table_nokiaca42v2,
        .num_interrupt_in =             1,
        .num_interrupt_out =            1,
@@ -962,21 +965,6 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
                        cypress_set_termios(port, &priv->tmp_termios);
                        return (0);
                        break;
-               /* these are called when setting baud rate from gpsd */
-               case TCGETS:
-                       if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) {
-                               return -EFAULT;
-                       }
-                       return (0);
-                       break;
-               case TCSETS:
-                       if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) {
-                               return -EFAULT;
-                       }
-                       /* here we need to call cypress_set_termios to invoke the new settings */
-                       cypress_set_termios(port, &priv->tmp_termios);
-                       return (0);
-                       break;
                /* This code comes from drivers/char/serial.c and ftdi_sio.c */
                case TIOCMIWAIT:
                        while (priv != NULL) {
@@ -1287,10 +1275,11 @@ static void cypress_read_int_callback(struct urb *urb)
        int bytes = 0;
        int result;
        int i = 0;
+       int status = urb->status;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
-       switch (urb->status) {
+       switch (status) {
        case 0: /* success */
                break;
        case -ECONNRESET:
@@ -1304,7 +1293,7 @@ static void cypress_read_int_callback(struct urb *urb)
        default:
                /* something ugly is going on... */
                dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n",
-                       __FUNCTION__,urb->status);
+                       __FUNCTION__, status);
                cypress_set_dead(port);
                return;
        }
@@ -1431,10 +1420,11 @@ static void cypress_write_int_callback(struct urb *urb)
        struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
        struct cypress_private *priv = usb_get_serial_port_data(port);
        int result;
+       int status = urb->status;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
-       
-       switch (urb->status) {
+
+       switch (status) {
                case 0:
                        /* success */
                        break;
@@ -1442,7 +1432,8 @@ static void cypress_write_int_callback(struct urb *urb)
                case -ENOENT:
                case -ESHUTDOWN:
                        /* this urb is terminated, clean up */
-                       dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+                       dbg("%s - urb shutting down with status: %d",
+                           __FUNCTION__, status);
                        priv->write_urb_in_use = 0;
                        return;
                case -EPIPE: /* no break needed; clear halt and resubmit */
@@ -1450,7 +1441,8 @@ static void cypress_write_int_callback(struct urb *urb)
                                break;
                        usb_clear_halt(port->serial->dev, 0x02);
                        /* error in the urb, so we have to resubmit it */
-                       dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+                       dbg("%s - nonzero write bulk status received: %d",
+                           __FUNCTION__, status);
                        port->interrupt_out_urb->transfer_buffer_length = 1;
                        port->interrupt_out_urb->dev = port->serial->dev;
                        result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
@@ -1462,7 +1454,7 @@ static void cypress_write_int_callback(struct urb *urb)
                        break;
                default:
                        dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n",
-                               __FUNCTION__,urb->status);
+                               __FUNCTION__, status);
                        cypress_set_dead(port);
                        break;
        }