[PATCH] USB: ftdi_sio
Linux Kernel Mailing List <[email protected]>
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1568, 2005/02/14 05:07:15-02:00, [email protected] [PATCH] USB: 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. ftdi_sio.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c --- a/drivers/usb/serial/ftdi_sio.c 2005-02-13 18:04:19 -08:00 +++ b/drivers/usb/serial/ftdi_sio.c 2005-02-13 18:04:19 -08:00 @@ -737,8 +737,6 @@ }; - - static struct usb_serial_device_type ftdi_userdev_device = { .owner = THIS_MODULE, .name = "FTDI SIO compatible", @@ -1240,15 +1238,6 @@ } /* 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 @@ } +/* 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 @@ 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 @@ /* 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 */