devres: release resources on device_del()
[powerpc.git] / drivers / usb / serial / cypress_m8.c
index a1fdb85..57b8e27 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) {
@@ -1493,7 +1481,7 @@ static struct cypress_buf *cypress_buf_alloc(unsigned int size)
        if (size == 0)
                return NULL;
 
-       cb = (struct cypress_buf *)kmalloc(sizeof(struct cypress_buf), GFP_KERNEL);
+       cb = kmalloc(sizeof(struct cypress_buf), GFP_KERNEL);
        if (cb == NULL)
                return NULL;