diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-24 00:20:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:53:35 -0500 |
commit | b24b8a247ff65c01b252025926fe564209fae4fc (patch) | |
tree | 8a9e0ea1e24b4733d8b9433d41877659505e9da4 /net/sched/sch_generic.c | |
parent | a92aa318b4b369091fd80433c80e62838db8bc1c (diff) |
[NET]: Convert init_timer into setup_timer
Many-many code in the kernel initialized the timer->function
and timer->data together with calling init_timer(timer). There
is already a helper for this. Use it for networking code.
The patch is HUGE, but makes the code 130 lines shorter
(98 insertions(+), 228 deletions(-)).
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index e595e6570ce0..84c048a54799 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -211,13 +211,6 @@ static void dev_watchdog(unsigned long arg) | |||
211 | dev_put(dev); | 211 | dev_put(dev); |
212 | } | 212 | } |
213 | 213 | ||
214 | static void dev_watchdog_init(struct net_device *dev) | ||
215 | { | ||
216 | init_timer(&dev->watchdog_timer); | ||
217 | dev->watchdog_timer.data = (unsigned long)dev; | ||
218 | dev->watchdog_timer.function = dev_watchdog; | ||
219 | } | ||
220 | |||
221 | void __netdev_watchdog_up(struct net_device *dev) | 214 | void __netdev_watchdog_up(struct net_device *dev) |
222 | { | 215 | { |
223 | if (dev->tx_timeout) { | 216 | if (dev->tx_timeout) { |
@@ -608,7 +601,7 @@ void dev_init_scheduler(struct net_device *dev) | |||
608 | INIT_LIST_HEAD(&dev->qdisc_list); | 601 | INIT_LIST_HEAD(&dev->qdisc_list); |
609 | qdisc_unlock_tree(dev); | 602 | qdisc_unlock_tree(dev); |
610 | 603 | ||
611 | dev_watchdog_init(dev); | 604 | setup_timer(&dev->watchdog_timer, dev_watchdog, (unsigned long)dev); |
612 | } | 605 | } |
613 | 606 | ||
614 | void dev_shutdown(struct net_device *dev) | 607 | void dev_shutdown(struct net_device *dev) |