Commit 11fc78a9 authored by Andrew Morton's avatar Andrew Morton Committed by James Morris

[NET]: Timer init fixes.

parent c1e9dcb3
...@@ -98,6 +98,10 @@ void ax25_dev_device_up(struct net_device *dev) ...@@ -98,6 +98,10 @@ void ax25_dev_device_up(struct net_device *dev)
ax25_dev->values[AX25_VALUES_PROTOCOL] = AX25_DEF_PROTOCOL; ax25_dev->values[AX25_VALUES_PROTOCOL] = AX25_DEF_PROTOCOL;
ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT; ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT;
#if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER)
init_timer(&ax25_dev->dama.slave_timer);
#endif
spin_lock_bh(&ax25_dev_lock); spin_lock_bh(&ax25_dev_lock);
ax25_dev->next = ax25_dev_list; ax25_dev->next = ax25_dev_list;
ax25_dev_list = ax25_dev; ax25_dev_list = ax25_dev;
......
...@@ -106,6 +106,8 @@ static struct net_bridge *new_nb(char *name) ...@@ -106,6 +106,8 @@ static struct net_bridge *new_nb(char *name)
memset(br, 0, sizeof(*br)); memset(br, 0, sizeof(*br));
dev = &br->dev; dev = &br->dev;
init_timer(&br->tick);
strncpy(dev->name, name, IFNAMSIZ); strncpy(dev->name, name, IFNAMSIZ);
dev->priv = br; dev->priv = br;
ether_setup(dev); ether_setup(dev);
......
...@@ -172,7 +172,7 @@ static struct packet_type *ptype_all; /* Taps */ ...@@ -172,7 +172,7 @@ static struct packet_type *ptype_all; /* Taps */
#ifdef OFFLINE_SAMPLE #ifdef OFFLINE_SAMPLE
static void sample_queue(unsigned long dummy); static void sample_queue(unsigned long dummy);
static struct timer_list samp_timer = { function: sample_queue }; static struct timer_list samp_timer = TIMER_INITIALIZER(sample_queue, 0, 0);
#endif #endif
#ifdef CONFIG_HOTPLUG #ifdef CONFIG_HOTPLUG
......
...@@ -39,7 +39,7 @@ static void dst_run_gc(unsigned long); ...@@ -39,7 +39,7 @@ static void dst_run_gc(unsigned long);
static void ___dst_free(struct dst_entry * dst); static void ___dst_free(struct dst_entry * dst);
static struct timer_list dst_gc_timer = static struct timer_list dst_gc_timer =
{ data: DST_GC_MIN, function: dst_run_gc }; TIMER_INITIALIZER(dst_run_gc, 0, DST_GC_MIN);
static void dst_run_gc(unsigned long dummy) static void dst_run_gc(unsigned long dummy)
{ {
......
...@@ -34,8 +34,7 @@ long alpha_hi; ...@@ -34,8 +34,7 @@ long alpha_hi;
static void alpha_tick(unsigned long); static void alpha_tick(unsigned long);
static struct timer_list alpha_timer = static struct timer_list alpha_timer = TIMER_INITIALIZER(alpha_tick, 0, 0);
{ .function = alpha_tick };
void alpha_tick(unsigned long dummy) void alpha_tick(unsigned long dummy)
{ {
...@@ -158,7 +157,7 @@ static void whitehole_inject(unsigned long); ...@@ -158,7 +157,7 @@ static void whitehole_inject(unsigned long);
int whitehole_init(struct net_device *dev); int whitehole_init(struct net_device *dev);
static struct timer_list whitehole_timer = static struct timer_list whitehole_timer =
{ .function = whitehole_inject }; TIMER_INITIALIZER(whitehole_inject, 0, 0);
static struct net_device whitehole_dev = { static struct net_device whitehole_dev = {
"whitehole", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, whitehole_init, }; "whitehole", 0x0, 0x0, 0x0, 0x0, 0, 0, 0, 0, 0, NULL, whitehole_init, };
......
...@@ -109,7 +109,8 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table; ...@@ -109,7 +109,8 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table;
static unsigned dn_rt_hash_mask; static unsigned dn_rt_hash_mask;
static struct timer_list dn_route_timer; static struct timer_list dn_route_timer;
static struct timer_list dn_rt_flush_timer = { .function = dn_run_flush }; static struct timer_list dn_rt_flush_timer =
TIMER_INITIALIZER(dn_run_flush, 0, 0);
int decnet_dst_gc_interval = 2; int decnet_dst_gc_interval = 2;
static struct dst_ops dn_dst_ops = { static struct dst_ops dn_dst_ops = {
...@@ -1260,6 +1261,7 @@ void __init dn_route_init(void) ...@@ -1260,6 +1261,7 @@ void __init dn_route_init(void)
if (!dn_dst_ops.kmem_cachep) if (!dn_dst_ops.kmem_cachep)
panic("DECnet: Failed to allocate dn_dst_cache\n"); panic("DECnet: Failed to allocate dn_dst_cache\n");
init_timer(&dn_route_timer);
dn_route_timer.function = dn_dst_check_expire; dn_route_timer.function = dn_dst_check_expire;
dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ;
add_timer(&dn_route_timer); add_timer(&dn_route_timer);
......
...@@ -94,7 +94,8 @@ rwlock_t addrconf_lock = RW_LOCK_UNLOCKED; ...@@ -94,7 +94,8 @@ rwlock_t addrconf_lock = RW_LOCK_UNLOCKED;
static void addrconf_verify(unsigned long); static void addrconf_verify(unsigned long);
static struct timer_list addr_chk_timer = { .function = addrconf_verify }; static struct timer_list addr_chk_timer =
TIMER_INITIALIZER(addrconf_verify, 0, 0);
static spinlock_t addrconf_verify_lock = SPIN_LOCK_UNLOCKED; static spinlock_t addrconf_verify_lock = SPIN_LOCK_UNLOCKED;
static int addrconf_ifdown(struct net_device *dev, int how); static int addrconf_ifdown(struct net_device *dev, int how);
......
...@@ -93,7 +93,7 @@ static struct fib6_node * fib6_repair_tree(struct fib6_node *fn); ...@@ -93,7 +93,7 @@ static struct fib6_node * fib6_repair_tree(struct fib6_node *fn);
static __u32 rt_sernum = 0; static __u32 rt_sernum = 0;
static struct timer_list ip6_fib_timer = { .function = fib6_run_gc }; static struct timer_list ip6_fib_timer = TIMER_INITIALIZER(fib6_run_gc, 0, 0);
static struct fib6_walker_t fib6_walker_list = { static struct fib6_walker_t fib6_walker_list = {
&fib6_walker_list, &fib6_walker_list, &fib6_walker_list, &fib6_walker_list,
......
...@@ -314,7 +314,7 @@ ip6_frag_create(unsigned int hash, u32 id, struct in6_addr *src, struct in6_addr ...@@ -314,7 +314,7 @@ ip6_frag_create(unsigned int hash, u32 id, struct in6_addr *src, struct in6_addr
ipv6_addr_copy(&fq->saddr, src); ipv6_addr_copy(&fq->saddr, src);
ipv6_addr_copy(&fq->daddr, dst); ipv6_addr_copy(&fq->daddr, dst);
/* init_timer has been done by the memset */ init_timer(&fq->timer);
fq->timer.function = ip6_frag_expire; fq->timer.function = ip6_frag_expire;
fq->timer.data = (long) fq; fq->timer.data = (long) fq;
fq->lock = SPIN_LOCK_UNLOCKED; fq->lock = SPIN_LOCK_UNLOCKED;
......
...@@ -1105,8 +1105,7 @@ PSCHED_WATCHER psched_time_mark; ...@@ -1105,8 +1105,7 @@ PSCHED_WATCHER psched_time_mark;
static void psched_tick(unsigned long); static void psched_tick(unsigned long);
static struct timer_list psched_timer = static struct timer_list psched_timer = TIMER_INITIALIZER(psched_tick, 0, 0);
{ function: psched_tick };
static void psched_tick(unsigned long dummy) static void psched_tick(unsigned long dummy)
{ {
......
...@@ -512,6 +512,7 @@ static struct sock *wanpipe_alloc_socket(void) ...@@ -512,6 +512,7 @@ static struct sock *wanpipe_alloc_socket(void)
/* Use timer to send data to the driver. This will act /* Use timer to send data to the driver. This will act
* as a BH handler for sendmsg functions */ * as a BH handler for sendmsg functions */
init_timer(&wan_opt->tx_timer);
wan_opt->tx_timer.data = (unsigned long)sk; wan_opt->tx_timer.data = (unsigned long)sk;
wan_opt->tx_timer.function = wanpipe_delayed_transmit; wan_opt->tx_timer.function = wanpipe_delayed_transmit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment