]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/serial/ipaq.c
USB: usb-serial: replace shutdown with disconnect, release
[karo-tx-linux.git] / drivers / usb / serial / ipaq.c
index 832a5a4f3cb3ca9ab3394b9795b7685c8f80d7b1..c4aa90489b402d759a35da9c6c0194e09bc18ff5 100644 (file)
@@ -79,7 +79,6 @@ static int  ipaq_open(struct tty_struct *tty,
 static void ipaq_close(struct tty_struct *tty,
                        struct usb_serial_port *port, struct file *filp);
 static int  ipaq_startup(struct usb_serial *serial);
-static void ipaq_shutdown(struct usb_serial *serial);
 static int ipaq_write(struct tty_struct *tty, struct usb_serial_port *port,
                        const unsigned char *buf, int count);
 static int ipaq_write_bulk(struct usb_serial_port *port,
@@ -581,7 +580,6 @@ static struct usb_serial_driver ipaq_device = {
        .open =                 ipaq_open,
        .close =                ipaq_close,
        .attach =               ipaq_startup,
-       .shutdown =             ipaq_shutdown,
        .write =                ipaq_write,
        .write_room =           ipaq_write_room,
        .chars_in_buffer =      ipaq_chars_in_buffer,
@@ -635,13 +633,7 @@ static int ipaq_open(struct tty_struct *tty,
                priv->free_len += PACKET_SIZE;
        }
 
-       /*
-        * Force low latency on. This will immediately push data to the line
-        * discipline instead of queueing.
-        */
-
        if (tty) {
-               tty->low_latency = 1;
                /* FIXME: These two are bogus */
                tty->raw = 1;
                tty->real_raw = 1;
@@ -651,15 +643,17 @@ static int ipaq_open(struct tty_struct *tty,
         */
 
        kfree(port->bulk_in_buffer);
+       kfree(port->bulk_out_buffer);
+       /* make sure the generic serial code knows */
+       port->bulk_out_buffer = NULL;
+
        port->bulk_in_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
-       if (port->bulk_in_buffer == NULL) {
-               port->bulk_out_buffer = NULL; /* prevent double free */
+       if (port->bulk_in_buffer == NULL)
                goto enomem;
-       }
 
-       kfree(port->bulk_out_buffer);
        port->bulk_out_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
        if (port->bulk_out_buffer == NULL) {
+               /* the buffer is useless, free it */
                kfree(port->bulk_in_buffer);
                port->bulk_in_buffer = NULL;
                goto enomem;
@@ -961,11 +955,6 @@ static int ipaq_startup(struct usb_serial *serial)
        return usb_reset_configuration(serial->dev);
 }
 
-static void ipaq_shutdown(struct usb_serial *serial)
-{
-       dbg("%s", __func__);
-}
-
 static int __init ipaq_init(void)
 {
        int retval;