lkml.org 
[lkml]   [2005]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectUSB 2.4.30: ftdi_sio
Granted, this is a cleanup, and we don't like cleanups in 2.4. But I really
dislike how the comment managed to detach from the function it described.
The idiotic error message is quite annoying, too.

diff -urpN -X dontdiff linux-2.4.30-pre1/drivers/usb/serial/ftdi_sio.c linux-2.4.30-pre1-usb/drivers/usb/serial/ftdi_sio.c
--- linux-2.4.30-pre1/drivers/usb/serial/ftdi_sio.c 2005-01-25 11:17:25.000000000 -0800
+++ linux-2.4.30-pre1-usb/drivers/usb/serial/ftdi_sio.c 2005-02-10 11:18:12.000000000 -0800
@@ -737,8 +737,6 @@ static struct usb_serial_device_type ftd
};


-
-
static struct usb_serial_device_type ftdi_userdev_device = {
.owner = THIS_MODULE,
.name = "FTDI SIO compatible",
@@ -1240,15 +1238,6 @@ static int ftdi_HE_TIRA1_startup (struct
} /* ftdi_HE_TIRA1_startup */


-/* ftdi_shutdown is called from usbserial:usb_serial_disconnect
- * it is called when the usb device is disconnected
- *
- * usbserial:usb_serial_disconnect
- * calls __serial_close for each open of the port
- * shutdown is called then (ie ftdi_shutdown)
- */
-
-
/* Startup for the 8U232AM chip */
static int ftdi_userdev_startup (struct usb_serial *serial)
{
@@ -1273,6 +1262,14 @@ static int ftdi_userdev_startup (struct
}


+/* ftdi_shutdown is called from usbserial:usb_serial_disconnect
+ * it is called when the usb device is disconnected
+ *
+ * usbserial:usb_serial_disconnect
+ * calls __serial_close for each open of the port
+ * shutdown is called then (ie ftdi_shutdown)
+ */
+
static void ftdi_shutdown (struct usb_serial *serial)
{ /* ftdi_shutdown */

@@ -1382,6 +1379,7 @@ static void ftdi_close (struct usb_seria
struct usb_serial *serial;
unsigned int c_cflag = port->tty->termios->c_cflag;
char buf[1];
+ int err;

dbg("%s", __FUNCTION__);

@@ -1412,8 +1410,9 @@ static void ftdi_close (struct usb_seria

/* shutdown our bulk read */
if (port->read_urb) {
- if(usb_unlink_urb (port->read_urb)<0)
- err("Error unlinking urb");
+ err = usb_unlink_urb (port->read_urb);
+ if (err < 0 && err != -ENODEV)
+ err("Error unlinking urb (%d)", err);
}
/* unlink the running write urbs */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.027 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site