diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-10-23 04:31:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-24 07:27:08 -0400 |
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 @@ | |||
35 | static void blink_led_timer(unsigned long context) | 35 | static void blink_led_timer(unsigned long context) |
36 | { | 36 | { |
37 | struct efx_nic *efx = (struct efx_nic *)context; | 37 | struct efx_nic *efx = (struct efx_nic *)context; |
38 | struct efx_blinker *bl = &efx->board_info.blinker; | 38 | struct efx_board *board = &efx->board_info; |
39 | efx->board_info.set_id_led(efx, bl->state); | 39 | |
40 | bl->state = !bl->state; | 40 | board->set_id_led(efx, board->blink_state); |
41 | if (bl->resubmit) | 41 | board->blink_state = !board->blink_state; |
42 | mod_timer(&bl->timer, jiffies + BLINK_INTERVAL); | 42 | if (board->blink_resubmit) |
43 | mod_timer(&board->blink_timer, jiffies + BLINK_INTERVAL); | ||
43 | } | 44 | } |
44 | 45 | ||
45 | static void board_blink(struct efx_nic *efx, bool blink) | 46 | static void board_blink(struct efx_nic *efx, bool blink) |
46 | { | 47 | { |
47 | struct efx_blinker *blinker = &efx->board_info.blinker; | 48 | struct efx_board *board = &efx->board_info; |
48 | 49 | ||
49 | /* The rtnl mutex serialises all ethtool ioctls, so | 50 | /* The rtnl mutex serialises all ethtool ioctls, so |
50 | * nothing special needs doing here. */ | 51 | * nothing special needs doing here. */ |
51 | if (blink) { | 52 | if (blink) { |
52 | blinker->resubmit = true; | 53 | board->blink_resubmit = true; |
53 | blinker->state = false; | 54 | board->blink_state = false; |
54 | setup_timer(&blinker->timer, blink_led_timer, | 55 | setup_timer(&board->blink_timer, blink_led_timer, |
55 | (unsigned long)efx); | 56 | (unsigned long)efx); |
56 | mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL); | 57 | mod_timer(&board->blink_timer, jiffies + BLINK_INTERVAL); |
57 | } else { | 58 | } else { |
58 | blinker->resubmit = false; | 59 | board->blink_resubmit = false; |
59 | if (blinker->timer.function) | 60 | if (board->blink_timer.function) |
60 | del_timer_sync(&blinker->timer); | 61 | del_timer_sync(&board->blink_timer); |
61 | efx->board_info.init_leds(efx); | 62 | board->init_leds(efx); |
62 | } | 63 | } |
63 | } | 64 | } |
64 | 65 | ||