aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-11-17 14:21:33 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-02 00:16:36 -0500
commit9300abd4c60d385683944b9bc5cbf2c7c2cc6e78 (patch)
treebc71b5cc99d42d0d76a903999ec50a657652cda0 /drivers
parenta4f0c2ca8c475e00caa469b4574950852c376076 (diff)
[PATCH] chelsio: remove leftover code
The chelsio network driver has some extra ifdef's that got in because the driver was originally based on code that worked on 2.4 as well as 2.6. This patch removes the dead code. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/chelsio/cxgb2.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index ad7ff9641a7e..a65660b0ea63 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -56,34 +56,6 @@
56#include "sge.h" 56#include "sge.h"
57#include "espi.h" 57#include "espi.h"
58 58
59#ifdef work_struct
60#include <linux/tqueue.h>
61#define INIT_WORK INIT_TQUEUE
62#define schedule_work schedule_task
63#define flush_scheduled_work flush_scheduled_tasks
64
65static inline void schedule_mac_stats_update(struct adapter *ap, int secs)
66{
67 mod_timer(&ap->stats_update_timer, jiffies + secs * HZ);
68}
69
70static inline void cancel_mac_stats_update(struct adapter *ap)
71{
72 del_timer_sync(&ap->stats_update_timer);
73 flush_scheduled_tasks();
74}
75
76/*
77 * Stats update timer for 2.4. It schedules a task to do the actual update as
78 * we need to access MAC statistics in process context.
79 */
80static void mac_stats_timer(unsigned long data)
81{
82 struct adapter *ap = (struct adapter *)data;
83
84 schedule_task(&ap->stats_update_task);
85}
86#else
87#include <linux/workqueue.h> 59#include <linux/workqueue.h>
88 60
89static inline void schedule_mac_stats_update(struct adapter *ap, int secs) 61static inline void schedule_mac_stats_update(struct adapter *ap, int secs)
@@ -95,7 +67,6 @@ static inline void cancel_mac_stats_update(struct adapter *ap)
95{ 67{
96 cancel_delayed_work(&ap->stats_update_task); 68 cancel_delayed_work(&ap->stats_update_task);
97} 69}
98#endif
99 70
100#define MAX_CMDQ_ENTRIES 16384 71#define MAX_CMDQ_ENTRIES 16384
101#define MAX_CMDQ1_ENTRIES 1024 72#define MAX_CMDQ1_ENTRIES 1024
@@ -1090,12 +1061,6 @@ static int __devinit init_one(struct pci_dev *pdev,
1090 ext_intr_task, adapter); 1061 ext_intr_task, adapter);
1091 INIT_WORK(&adapter->stats_update_task, mac_stats_task, 1062 INIT_WORK(&adapter->stats_update_task, mac_stats_task,
1092 adapter); 1063 adapter);
1093#ifdef work_struct
1094 init_timer(&adapter->stats_update_timer);
1095 adapter->stats_update_timer.function = mac_stats_timer;
1096 adapter->stats_update_timer.data =
1097 (unsigned long)adapter;
1098#endif
1099 1064
1100 pci_set_drvdata(pdev, netdev); 1065 pci_set_drvdata(pdev, netdev);
1101 } 1066 }