lkml.org 
[lkml]   [2004]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Little rework of usbserial in 2.4
On Sat, 27 Nov 2004 17:35:58 -0800, Pete Zaitcev <zaitcev@redhat.com> wrote:
> Hi, Greg, hi, guys:

<snip>

> diff -urpN -X dontdiff linux-2.4.28-bk3/drivers/usb/serial/usbserial.c linux-2.4.28-bk3-sx4/drivers/usb/serial/usbserial.c
> --- linux-2.4.28-bk3/drivers/usb/serial/usbserial.c 2004-11-22 23:04:19.000000000 -0800
> +++ linux-2.4.28-bk3-sx4/drivers/usb/serial/usbserial.c 2004-11-27 10:36:49.000000000 -0800

<snip>

> @@ -1803,6 +1820,12 @@ static void __exit usb_serial_exit(void)
>
> usb_deregister(&usb_serial_driver);
> tty_unregister_driver(&serial_tty_driver);
> +
> + while (!list_empty(&usb_serial_driver_list)) {
> + err("%s - module is in use, hanging...\n", __FUNCTION__);
> + set_current_state(TASK_UNINTERRUPTIBLE);
> + schedule_timeout(5*HZ);
> + }

Please consider using msleep() here instead of schedule_timeout().

Thanks,
Nish
-
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:08    [W:0.151 / U:21.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site