From 79affa7aca37b922bfd0ff74a7164145bbe15a8f Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Fri, 8 Dec 2006 02:39:05 -0800 Subject: [PATCH] --- yaml --- r: 43711 b: refs/heads/master c: c9594643c095da0a0ad4d5f0a1ff357a84e91524 h: refs/heads/master i: 43709: fab5519e0a98d057f4e7beb11cde6c9c32318313 43707: 85848b3c3ceadec6d8a57d3d861727490c73ff80 43703: 2a69a268668d6820c6bbb86774b72a30bd2afd9b 43695: 06549aa0e464738e3c56eff13c1d1f6ca764ce96 43679: 9df50576495083dc69f65a01b082ef7c58e5ec32 43647: f6df9bc307d78ca7504502e0ad8b244458fa15ff v: v3 --- [refs] | 2 +- trunk/drivers/char/sx.c | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index fc7468f1be63..666b3df2c8df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 15b611f63f0fb8709a5fae498c2d688b5d05edc9 +refs/heads/master: c9594643c095da0a0ad4d5f0a1ff357a84e91524 diff --git a/trunk/drivers/char/sx.c b/trunk/drivers/char/sx.c index 401ebab26018..0122b2d93312 100644 --- a/trunk/drivers/char/sx.c +++ b/trunk/drivers/char/sx.c @@ -1353,10 +1353,7 @@ static void sx_pollfunc(unsigned long data) sx_interrupt(0, board); - init_timer(&board->timer); - - board->timer.expires = jiffies + sx_poll; - add_timer(&board->timer); + mod_timer(&board->timer, jiffies + sx_poll); func_exit(); } @@ -2134,14 +2131,10 @@ static int sx_init_board(struct sx_board *board) /* The timer should be initialized anyway: That way we can safely del_timer it when the module is unloaded. */ - init_timer(&board->timer); + setup_timer(&board->timer, sx_pollfunc, (unsigned long)board); - if (board->poll) { - board->timer.data = (unsigned long)board; - board->timer.function = sx_pollfunc; - board->timer.expires = jiffies + board->poll; - add_timer(&board->timer); - } + if (board->poll) + mod_timer(&board->timer, jiffies + board->poll); } else { board->irq = 0; }