From: Lai Jiangshan Date: Fri, 15 Mar 2013 06:50:52 +0000 (+0000) Subject: netpoll: use DEFINE_STATIC_SRCU() to define netpoll_srcu X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f9421c264f8a6e6137027a45ae576517f66fa56;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David S. Miller --- 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; static atomic_t trapped; -static struct srcu_struct netpoll_srcu; +DEFINE_STATIC_SRCU(netpoll_srcu); #define USEC_PER_POLL 50 #define NETPOLL_RX_ENABLED 1 @@ -1212,7 +1212,6 @@ EXPORT_SYMBOL(netpoll_setup); static int __init netpoll_init(void) { skb_queue_head_init(&skb_pool); - init_srcu_struct(&netpoll_srcu); return 0; } core_initcall(netpoll_init);