diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-23 08:31:29 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-24 04:27:08 -0700 |
commit | 7d4cdb5af0d079d095501ad4164b4985a1661098 (patch) | |
tree | 6e234a1094efd6e05f7280a2f26d173a41059372 /drivers/net/sfc/falcon_boards.c | |
parent | 63f1988419ccaa544d1d31aadc1dd309f6471ffe (diff) |
sfc: Merge struct efx_blinker into struct efx_board
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_boards.c')
-rw-r--r-- | drivers/net/sfc/falcon_boards.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c index 3078c005811f..f65738bb5536 100644 --- a/drivers/net/sfc/falcon_boards.c +++ b/drivers/net/sfc/falcon_boards.c @@ -35,30 +35,31 @@ static void blink_led_timer(unsigned long context) { struct efx_nic *efx = (struct efx_nic *)context; - struct efx_blinker *bl = &efx->board_info.blinker; - efx->board_info.set_id_led(efx, bl->state); - bl->state = !bl->state; - if (bl->resubmit) - mod_timer(&bl->timer, jiffies + BLINK_INTERVAL); + struct efx_board *board = &efx->board_info; + + board->set_id_led(efx, board->blink_state); + board->blink_state = !board->blink_state; + if (board->blink_resubmit) + mod_timer(&board->blink_timer, jiffies + BLINK_INTERVAL); } static void board_blink(struct efx_nic *efx, bool blink) { - struct efx_blinker *blinker = &efx->board_info.blinker; + struct efx_board *board = &efx->board_info; /* The rtnl mutex serialises all ethtool ioctls, so * nothing special needs doing here. */ if (blink) { - blinker->resubmit = true; - blinker->state = false; - setup_timer(&blinker->timer, blink_led_timer, + board->blink_resubmit = true; + board->blink_state = false; + setup_timer(&board->blink_timer, blink_led_timer, (unsigned long)efx); - mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL); + mod_timer(&board->blink_timer, jiffies + BLINK_INTERVAL); } else { - blinker->resubmit = false; - if (blinker->timer.function) - del_timer_sync(&blinker->timer); - efx->board_info.init_leds(efx); + board->blink_resubmit = false; + if (board->blink_timer.function) + del_timer_sync(&board->blink_timer); + board->init_leds(efx); } } |