aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r--drivers/char/isicom.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 783a7ec0a8e..734fe39a6ac 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -172,6 +172,7 @@ static struct pci_driver isicom_driver = {
172static int prev_card = 3; /* start servicing isi_card[0] */ 172static int prev_card = 3; /* start servicing isi_card[0] */
173static struct tty_driver *isicom_normal; 173static struct tty_driver *isicom_normal;
174 174
175static DECLARE_COMPLETION(isi_timerdone);
175static struct timer_list tx; 176static struct timer_list tx;
176static char re_schedule = 1; 177static char re_schedule = 1;
177 178
@@ -514,7 +515,7 @@ static void isicom_tx(unsigned long _data)
514 /* schedule another tx for hopefully in about 10ms */ 515 /* schedule another tx for hopefully in about 10ms */
515sched_again: 516sched_again:
516 if (!re_schedule) { 517 if (!re_schedule) {
517 re_schedule = 2; 518 complete(&isi_timerdone);
518 return; 519 return;
519 } 520 }
520 521
@@ -1924,12 +1925,9 @@ error:
1924 1925
1925static void __exit isicom_exit(void) 1926static void __exit isicom_exit(void)
1926{ 1927{
1927 unsigned int index = 0;
1928
1929 re_schedule = 0; 1928 re_schedule = 0;
1930 1929
1931 while (re_schedule != 2 && index++ < 100) 1930 wait_for_completion_timeout(&isi_timerdone, HZ);
1932 msleep(10);
1933 1931
1934 pci_unregister_driver(&isicom_driver); 1932 pci_unregister_driver(&isicom_driver);
1935 tty_unregister_driver(isicom_normal); 1933 tty_unregister_driver(isicom_normal);