Commit 7f9421c2 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by David S. Miller

netpoll: use DEFINE_STATIC_SRCU() to define netpoll_srcu

DEFINE_STATIC_SRCU() defines srcu struct and do init at build time.
Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6681712d
...@@ -47,7 +47,7 @@ static struct sk_buff_head skb_pool; ...@@ -47,7 +47,7 @@ static struct sk_buff_head skb_pool;
static atomic_t trapped; static atomic_t trapped;
static struct srcu_struct netpoll_srcu; DEFINE_STATIC_SRCU(netpoll_srcu);
#define USEC_PER_POLL 50 #define USEC_PER_POLL 50
#define NETPOLL_RX_ENABLED 1 #define NETPOLL_RX_ENABLED 1
...@@ -1212,7 +1212,6 @@ EXPORT_SYMBOL(netpoll_setup); ...@@ -1212,7 +1212,6 @@ EXPORT_SYMBOL(netpoll_setup);
static int __init netpoll_init(void) static int __init netpoll_init(void)
{ {
skb_queue_head_init(&skb_pool); skb_queue_head_init(&skb_pool);
init_srcu_struct(&netpoll_srcu);
return 0; return 0;
} }
core_initcall(netpoll_init); core_initcall(netpoll_init);
......
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