moxa, fix and optimise empty timer don't wait and delete empty timer in empty timer function. Also fire next empty timer at rounded jiffies to save power.
Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]> --- commit da52793b6347e8b6b048526ce2422e29b20bb335 tree ad0bee78e45beef89dc740f81e0606d782296542 parent 3a69b463dcad1ff142f46e8fb74e7dc5a092eb60 author Jiri Slaby <[EMAIL PROTECTED]> Wed, 25 Jul 2007 23:42:49 +0200 committer Jiri Slaby <[EMAIL PROTECTED]> Wed, 25 Jul 2007 23:42:49 +0200 drivers/char/moxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index ed76f0a..5000b3b 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -1040,14 +1040,14 @@ static void check_xmit_empty(unsigned long data) struct moxa_port *ch; ch = (struct moxa_port *) data; - del_timer_sync(&moxa_ports[ch->port].emptyTimer); if (ch->tty && (ch->statusflags & EMPTYWAIT)) { if (MoxaPortTxQueue(ch->port) == 0) { ch->statusflags &= ~EMPTYWAIT; tty_wakeup(ch->tty); return; } - mod_timer(&moxa_ports[ch->port].emptyTimer, jiffies + HZ); + mod_timer(&moxa_ports[ch->port].emptyTimer, + round_jiffies(jiffies + HZ)); } else ch->statusflags &= ~EMPTYWAIT; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/