public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/7] Char: moxa, use del_timer_sync
Date: Fri,  5 Jan 2007 18:10:52 +0100 (CET)	[thread overview]
Message-ID: <572728011959124127@wsc.cz> (raw)
In-Reply-To: <16079316021425814645@wsc.cz>

moxa, use del_timer_sync

Use del_timer_sync in most timer deletions, we don't want to oops in the
timer function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit 040f78a69ad874e2976ab93a55cde2dc02df7d66
tree 22edf4da2daee70849b8ddfb4c4f04efb8d7bf59
parent 49a3eb961ed6dca0e44778f26910e9e4ed6fd491
author Jiri Slaby <jirislaby@gmail.com> Wed, 03 Jan 2007 12:28:56 +0059
committer Jiri Slaby <jirislaby@gmail.com> Fri, 05 Jan 2007 17:38:49 +0059

 drivers/char/moxa.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index da2a1d1..9eb8fa6 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -424,10 +424,10 @@ static void __exit moxa_exit(void)
 	if (verbose)
 		printk("Unloading module moxa ...\n");
 
-	del_timer(&moxaTimer);
+	del_timer_sync(&moxaTimer);
 
 	for (i = 0; i < MAX_PORTS; i++)
-		del_timer(&moxaEmptyTimer[i]);
+		del_timer_sync(&moxaEmptyTimer[i]);
 
 	if (tty_unregister_driver(moxaDriver))
 		printk("Couldn't unregister MOXA Intellio family serial driver\n");
@@ -529,7 +529,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
 	if (ch->asyncflags & ASYNC_INITIALIZED) {
 		setup_empty_event(tty);
 		tty_wait_until_sent(tty, 30 * HZ);	/* 30 seconds timeout */
-		del_timer(&moxaEmptyTimer[ch->port]);
+		del_timer_sync(&moxaEmptyTimer[ch->port]);
 	}
 	shut_down(ch);
 	MoxaPortFlushData(port, 2);
@@ -1004,7 +1004,7 @@ static void check_xmit_empty(unsigned long data)
 	struct moxa_str *ch;
 
 	ch = (struct moxa_str *) data;
-	del_timer(&moxaEmptyTimer[ch->port]);
+	del_timer_sync(&moxaEmptyTimer[ch->port]);
 	if (ch->tty && (ch->statusflags & EMPTYWAIT)) {
 		if (MoxaPortTxQueue(ch->port) == 0) {
 			ch->statusflags &= ~EMPTYWAIT;

  reply	other threads:[~2007-01-05 17:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05 17:10 [PATCH 1/7] Char: moxa, macros cleanup Jiri Slaby
2007-01-05 17:10 ` Jiri Slaby [this message]
2007-01-05 17:11 ` [PATCH 3/7] Char: moxa, remove moxa_pci_devinfo Jiri Slaby
2007-01-05 17:11 ` [PATCH 4/7] Char: moxa, variables cleanup Jiri Slaby
2007-01-05 17:11 ` [PATCH 5/7] Char: moxa, remove useless vairables Jiri Slaby
2007-01-05 17:12 ` [PATCH 6/7] Char: moxa, pci_probing prepare Jiri Slaby
2007-01-05 17:12 ` [PATCH 7/7] Char: moxa, pci probing Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=572728011959124127@wsc.cz \
    --to=jirislaby@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox