]> err.no Git - linux-2.6/blobdiff - drivers/usb/serial/omninet.c
USB: debug port converter does not accept more than 8 byte packets
[linux-2.6] / drivers / usb / serial / omninet.c
index 1b041c59aab250d779297efd2f25180e2dcfa2a7..7b7422f4947854008500f13cb3deabd2cde0be45 100644 (file)
@@ -194,7 +194,7 @@ static void omninet_close (struct usb_serial_port *port, struct file * filp)
 
 static void omninet_read_bulk_callback (struct urb *urb)
 {
-       struct usb_serial_port  *port   = (struct usb_serial_port *)urb->context;
+       struct usb_serial_port  *port   = urb->context;
        unsigned char           *data   = urb->transfer_buffer;
        struct omninet_header   *header = (struct omninet_header *) &data[0];
        int status = urb->status;
@@ -295,8 +295,9 @@ static int omninet_write_room (struct usb_serial_port *port)
        struct usb_serial       *serial = port->serial;
        struct usb_serial_port  *wport  = serial->port[1];
 
-       int room = 0; // Default: no room
+       int room = 0; /* Default: no room */
 
+       /* FIXME: no consistent locking for write_urb_busy */
        if (wport->write_urb_busy)
                room = wport->bulk_out_size - OMNINET_HEADERLEN;
 
@@ -308,7 +309,7 @@ static int omninet_write_room (struct usb_serial_port *port)
 static void omninet_write_bulk_callback (struct urb *urb)
 {
 /*     struct omninet_header   *header = (struct omninet_header  *) urb->transfer_buffer; */
-       struct usb_serial_port  *port   = (struct usb_serial_port *) urb->context;
+       struct usb_serial_port  *port   =  urb->context;
        int status = urb->status;
 
        dbg("%s - port %0x\n", __func__, port->number);