diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-09-09 16:10:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 17:03:48 -0400 |
commit | 8d06afab73a75f40ae2864e6c296356bab1ab473 (patch) | |
tree | 1d9c8c24a1024a12a4e8df841fba5809fa914356 /net | |
parent | 7c352bdf048811b8128019ffc1e886161e09c11c (diff) |
[PATCH] timer initialization cleanup: DEFINE_TIMER
Clean up timer initialization by introducing DEFINE_TIMER a'la
DEFINE_SPINLOCK. Build and boot-tested on x86. A similar patch has been
been in the -RT tree for some time.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/mpc.c | 2 | ||||
-rw-r--r-- | net/core/dst.c | 3 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 3 | ||||
-rw-r--r-- | net/ipv4/inetpeer.c | 3 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 3 | ||||
-rw-r--r-- | net/ipv6/ip6_fib.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 2 | ||||
-rw-r--r-- | net/netrom/nr_loopback.c | 2 | ||||
-rw-r--r-- | net/sched/sch_api.c | 2 |
9 files changed, 9 insertions, 13 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 17a81ebe7e6e..526d9531411f 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -105,7 +105,7 @@ extern void mpc_proc_clean(void); | |||
105 | 105 | ||
106 | struct mpoa_client *mpcs = NULL; /* FIXME */ | 106 | struct mpoa_client *mpcs = NULL; /* FIXME */ |
107 | static struct atm_mpoa_qos *qos_head = NULL; | 107 | static struct atm_mpoa_qos *qos_head = NULL; |
108 | static struct timer_list mpc_timer = TIMER_INITIALIZER(NULL, 0, 0); | 108 | static DEFINE_TIMER(mpc_timer, NULL, 0, 0); |
109 | 109 | ||
110 | 110 | ||
111 | static struct mpoa_client *find_mpc_by_itfnum(int itf) | 111 | static struct mpoa_client *find_mpc_by_itfnum(int itf) |
diff --git a/net/core/dst.c b/net/core/dst.c index 334790da9f16..470c05bc4cb2 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -39,8 +39,7 @@ static unsigned long dst_gc_timer_inc = DST_GC_MAX; | |||
39 | static void dst_run_gc(unsigned long); | 39 | static void dst_run_gc(unsigned long); |
40 | static void ___dst_free(struct dst_entry * dst); | 40 | static void ___dst_free(struct dst_entry * dst); |
41 | 41 | ||
42 | static struct timer_list dst_gc_timer = | 42 | static DEFINE_TIMER(dst_gc_timer, dst_run_gc, DST_GC_MIN, 0); |
43 | TIMER_INITIALIZER(dst_run_gc, DST_GC_MIN, 0); | ||
44 | 43 | ||
45 | static void dst_run_gc(unsigned long dummy) | 44 | static void dst_run_gc(unsigned long dummy) |
46 | { | 45 | { |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 2c915f305be3..3407f190afe8 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -117,8 +117,7 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table; | |||
117 | static unsigned dn_rt_hash_mask; | 117 | static unsigned dn_rt_hash_mask; |
118 | 118 | ||
119 | static struct timer_list dn_route_timer; | 119 | static struct timer_list dn_route_timer; |
120 | static struct timer_list dn_rt_flush_timer = | 120 | static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0); |
121 | TIMER_INITIALIZER(dn_run_flush, 0, 0); | ||
122 | int decnet_dst_gc_interval = 2; | 121 | int decnet_dst_gc_interval = 2; |
123 | 122 | ||
124 | static struct dst_ops dn_dst_ops = { | 123 | static struct dst_ops dn_dst_ops = { |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index f84ba9c96551..2fc3fd38924f 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
@@ -100,8 +100,7 @@ DEFINE_SPINLOCK(inet_peer_unused_lock); | |||
100 | #define PEER_MAX_CLEANUP_WORK 30 | 100 | #define PEER_MAX_CLEANUP_WORK 30 |
101 | 101 | ||
102 | static void peer_check_expire(unsigned long dummy); | 102 | static void peer_check_expire(unsigned long dummy); |
103 | static struct timer_list peer_periodic_timer = | 103 | static DEFINE_TIMER(peer_periodic_timer, peer_check_expire, 0, 0); |
104 | TIMER_INITIALIZER(peer_check_expire, 0, 0); | ||
105 | 104 | ||
106 | /* Exported for sysctl_net_ipv4. */ | 105 | /* Exported for sysctl_net_ipv4. */ |
107 | int inet_peer_gc_mintime = 10 * HZ, | 106 | int inet_peer_gc_mintime = 10 * HZ, |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6d6fb74f3b52..2fea3f4402a0 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -123,8 +123,7 @@ DEFINE_RWLOCK(addrconf_lock); | |||
123 | 123 | ||
124 | static void addrconf_verify(unsigned long); | 124 | static void addrconf_verify(unsigned long); |
125 | 125 | ||
126 | static struct timer_list addr_chk_timer = | 126 | static DEFINE_TIMER(addr_chk_timer, addrconf_verify, 0, 0); |
127 | TIMER_INITIALIZER(addrconf_verify, 0, 0); | ||
128 | static DEFINE_SPINLOCK(addrconf_verify_lock); | 127 | static DEFINE_SPINLOCK(addrconf_verify_lock); |
129 | 128 | ||
130 | static void addrconf_join_anycast(struct inet6_ifaddr *ifp); | 129 | static void addrconf_join_anycast(struct inet6_ifaddr *ifp); |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 16af874c9e8f..4fcc5a7acf6e 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -92,7 +92,7 @@ static struct fib6_node * fib6_repair_tree(struct fib6_node *fn); | |||
92 | 92 | ||
93 | static __u32 rt_sernum; | 93 | static __u32 rt_sernum; |
94 | 94 | ||
95 | static struct timer_list ip6_fib_timer = TIMER_INITIALIZER(fib6_run_gc, 0, 0); | 95 | static DEFINE_TIMER(ip6_fib_timer, fib6_run_gc, 0, 0); |
96 | 96 | ||
97 | struct fib6_walker_t fib6_walker_list = { | 97 | struct fib6_walker_t fib6_walker_list = { |
98 | .prev = &fib6_walker_list, | 98 | .prev = &fib6_walker_list, |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index a7db762de14a..f841bde30c18 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -50,7 +50,7 @@ static atomic_t fl_size = ATOMIC_INIT(0); | |||
50 | static struct ip6_flowlabel *fl_ht[FL_HASH_MASK+1]; | 50 | static struct ip6_flowlabel *fl_ht[FL_HASH_MASK+1]; |
51 | 51 | ||
52 | static void ip6_fl_gc(unsigned long dummy); | 52 | static void ip6_fl_gc(unsigned long dummy); |
53 | static struct timer_list ip6_fl_gc_timer = TIMER_INITIALIZER(ip6_fl_gc, 0, 0); | 53 | static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc, 0, 0); |
54 | 54 | ||
55 | /* FL hash table lock: it protects only of GC */ | 55 | /* FL hash table lock: it protects only of GC */ |
56 | 56 | ||
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c index 165b2abce110..e856ae1b360a 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c | |||
@@ -17,7 +17,7 @@ | |||
17 | static void nr_loopback_timer(unsigned long); | 17 | static void nr_loopback_timer(unsigned long); |
18 | 18 | ||
19 | static struct sk_buff_head loopback_queue; | 19 | static struct sk_buff_head loopback_queue; |
20 | static struct timer_list loopback_timer = TIMER_INITIALIZER(nr_loopback_timer, 0, 0); | 20 | static DEFINE_TIMER(loopback_timer, nr_loopback_timer, 0, 0); |
21 | 21 | ||
22 | void __init nr_loopback_init(void) | 22 | void __init nr_loopback_init(void) |
23 | { | 23 | { |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 737681cb9a92..31570b9a6e9a 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -1194,7 +1194,7 @@ EXPORT_SYMBOL(psched_time_base); | |||
1194 | * with 32-bit get_cycles(). Safe up to 4GHz CPU. | 1194 | * with 32-bit get_cycles(). Safe up to 4GHz CPU. |
1195 | */ | 1195 | */ |
1196 | static void psched_tick(unsigned long); | 1196 | static void psched_tick(unsigned long); |
1197 | static struct timer_list psched_timer = TIMER_INITIALIZER(psched_tick, 0, 0); | 1197 | static DEFINE_TIMER(psched_timer, psched_tick, 0, 0); |
1198 | 1198 | ||
1199 | static void psched_tick(unsigned long dummy) | 1199 | static void psched_tick(unsigned long dummy) |
1200 | { | 1200 | { |