diff options
Diffstat (limited to 'drivers/net/chelsio/cxgb2.c')
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 53bec6739812..de48eadddbc4 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -953,10 +953,11 @@ static void t1_netpoll(struct net_device *dev) | |||
953 | * Periodic accumulation of MAC statistics. This is used only if the MAC | 953 | * Periodic accumulation of MAC statistics. This is used only if the MAC |
954 | * does not have any other way to prevent stats counter overflow. | 954 | * does not have any other way to prevent stats counter overflow. |
955 | */ | 955 | */ |
956 | static void mac_stats_task(void *data) | 956 | static void mac_stats_task(struct work_struct *work) |
957 | { | 957 | { |
958 | int i; | 958 | int i; |
959 | struct adapter *adapter = data; | 959 | struct adapter *adapter = |
960 | container_of(work, struct adapter, stats_update_task.work); | ||
960 | 961 | ||
961 | for_each_port(adapter, i) { | 962 | for_each_port(adapter, i) { |
962 | struct port_info *p = &adapter->port[i]; | 963 | struct port_info *p = &adapter->port[i]; |
@@ -977,9 +978,10 @@ static void mac_stats_task(void *data) | |||
977 | /* | 978 | /* |
978 | * Processes elmer0 external interrupts in process context. | 979 | * Processes elmer0 external interrupts in process context. |
979 | */ | 980 | */ |
980 | static void ext_intr_task(void *data) | 981 | static void ext_intr_task(struct work_struct *work) |
981 | { | 982 | { |
982 | struct adapter *adapter = data; | 983 | struct adapter *adapter = |
984 | container_of(work, struct adapter, ext_intr_handler_task); | ||
983 | 985 | ||
984 | t1_elmer0_ext_intr_handler(adapter); | 986 | t1_elmer0_ext_intr_handler(adapter); |
985 | 987 | ||
@@ -1113,9 +1115,9 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1113 | spin_lock_init(&adapter->mac_lock); | 1115 | spin_lock_init(&adapter->mac_lock); |
1114 | 1116 | ||
1115 | INIT_WORK(&adapter->ext_intr_handler_task, | 1117 | INIT_WORK(&adapter->ext_intr_handler_task, |
1116 | ext_intr_task, adapter); | 1118 | ext_intr_task); |
1117 | INIT_WORK(&adapter->stats_update_task, mac_stats_task, | 1119 | INIT_DELAYED_WORK(&adapter->stats_update_task, |
1118 | adapter); | 1120 | mac_stats_task); |
1119 | 1121 | ||
1120 | pci_set_drvdata(pdev, netdev); | 1122 | pci_set_drvdata(pdev, netdev); |
1121 | } | 1123 | } |