diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-05-16 21:13:57 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-22 05:59:23 -0400 |
commit | 4cc58bdebfcb7561de401999705a5cde16674842 (patch) | |
tree | 73842e3d7e3ab5d17122b86c00da0f05a0357968 /drivers | |
parent | 071f92d05967a0c8422f1c8587ce0b4d90a8b447 (diff) | |
download | op-kernel-dev-4cc58bdebfcb7561de401999705a5cde16674842.zip op-kernel-dev-4cc58bdebfcb7561de401999705a5cde16674842.tar.gz |
sfc: Use mod_timer() to set expiry and add_timer() together
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sfc/boards.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/sfc/boards.c b/drivers/net/sfc/boards.c index eecaa6d..7fc0328 100644 --- a/drivers/net/sfc/boards.c +++ b/drivers/net/sfc/boards.c @@ -27,10 +27,8 @@ static void blink_led_timer(unsigned long context) struct efx_blinker *bl = &efx->board_info.blinker; efx->board_info.set_fault_led(efx, bl->state); bl->state = !bl->state; - if (bl->resubmit) { - bl->timer.expires = jiffies + BLINK_INTERVAL; - add_timer(&bl->timer); - } + if (bl->resubmit) + mod_timer(&bl->timer, jiffies + BLINK_INTERVAL); } static void board_blink(struct efx_nic *efx, int blink) @@ -44,8 +42,7 @@ static void board_blink(struct efx_nic *efx, int blink) blinker->state = 0; setup_timer(&blinker->timer, blink_led_timer, (unsigned long)efx); - blinker->timer.expires = jiffies + BLINK_INTERVAL; - add_timer(&blinker->timer); + mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL); } else { blinker->resubmit = 0; if (blinker->timer.function) |