X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fempeg.c;h=677b31fc544a465fd050b1cdbb3d592e83ef8b96;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=9af8f5ca9a5f00fc7d95c9d7426debdba86b5066;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9;p=linux-2.6.git diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index 9af8f5ca9..677b31fc5 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c @@ -157,9 +157,6 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp) struct usb_serial *serial = port->serial; int result = 0; - if (port_paranoia_check (port, __FUNCTION__)) - return -ENODEV; - dbg("%s - port %d", __FUNCTION__, port->number); /* Force default termio settings */ @@ -190,21 +187,10 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp) static void empeg_close (struct usb_serial_port *port, struct file * filp) { - struct usb_serial *serial; - - if (port_paranoia_check (port, __FUNCTION__)) - return; - dbg("%s - port %d", __FUNCTION__, port->number); - serial = get_usb_serial (port, __FUNCTION__); - if (!serial) - return; - - if (serial->dev) { - /* shutdown our bulk read */ - usb_unlink_urb (port->read_urb); - } + /* shutdown our bulk read */ + usb_unlink_urb (port->read_urb); /* Uncomment the following line if you want to see some statistics in your syslog */ /* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */ } @@ -353,9 +339,6 @@ static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; - if (port_paranoia_check (port, __FUNCTION__)) - return; - dbg("%s - port %d", __FUNCTION__, port->number); if (urb->status) { @@ -370,22 +353,13 @@ static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs) static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs) { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; - struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; int i; int result; - if (port_paranoia_check (port, __FUNCTION__)) - return; - dbg("%s - port %d", __FUNCTION__, port->number); - if (!serial) { - dbg("%s - bad serial pointer, exiting", __FUNCTION__); - return; - } - if (urb->status) { dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); return; @@ -416,8 +390,8 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs) /* Continue trying to always read */ usb_fill_bulk_urb( port->read_urb, - serial->dev, - usb_rcvbulkpipe(serial->dev, + port->serial->dev, + usb_rcvbulkpipe(port->serial->dev, port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,