diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2013-03-15 02:50:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-17 12:42:43 -0400 |
commit | 7f9421c264f8a6e6137027a45ae576517f66fa56 (patch) | |
tree | 5af643f10c5d164f617b7e1515d78fac5680faf7 /net/core/netpoll.c | |
parent | 6681712d67eef14c4ce793561c3231659153a320 (diff) |
netpoll: use DEFINE_STATIC_SRCU() to define netpoll_srcu
DEFINE_STATIC_SRCU() defines srcu struct and do init at build time.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index fa32899006a2..a3a17aed3639 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -47,7 +47,7 @@ static struct sk_buff_head skb_pool; | |||
47 | 47 | ||
48 | static atomic_t trapped; | 48 | static atomic_t trapped; |
49 | 49 | ||
50 | static struct srcu_struct netpoll_srcu; | 50 | DEFINE_STATIC_SRCU(netpoll_srcu); |
51 | 51 | ||
52 | #define USEC_PER_POLL 50 | 52 | #define USEC_PER_POLL 50 |
53 | #define NETPOLL_RX_ENABLED 1 | 53 | #define NETPOLL_RX_ENABLED 1 |
@@ -1212,7 +1212,6 @@ EXPORT_SYMBOL(netpoll_setup); | |||
1212 | static int __init netpoll_init(void) | 1212 | static int __init netpoll_init(void) |
1213 | { | 1213 | { |
1214 | skb_queue_head_init(&skb_pool); | 1214 | skb_queue_head_init(&skb_pool); |
1215 | init_srcu_struct(&netpoll_srcu); | ||
1216 | return 0; | 1215 | return 0; |
1217 | } | 1216 | } |
1218 | core_initcall(netpoll_init); | 1217 | core_initcall(netpoll_init); |