diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-02-11 17:07:33 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-12 19:23:32 -0500 |
commit | 4f1e9d8949b438c7791993515fc164312e9080e2 (patch) | |
tree | a41cb7eee0792da76d7f454a6852cfcdf2f49376 /net/sched/act_simple.c | |
parent | a5b5c958ffd1610545d6b4b8290aa9c5266d10fa (diff) | |
download | talos-obmc-linux-4f1e9d8949b438c7791993515fc164312e9080e2.tar.gz talos-obmc-linux-4f1e9d8949b438c7791993515fc164312e9080e2.zip |
net_sched: act: move tcf_hashinfo_init() into tcf_register_action()
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_simple.c')
-rw-r--r-- | net/sched/act_simple.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 14b5e362a1d6..992c2317ce88 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -25,7 +25,6 @@ #include <net/tc_act/tc_defact.h> #define SIMP_TAB_MASK 7 -static struct tcf_hashinfo simp_hash_info; #define SIMP_MAX_DATA 32 static int tcf_simp(struct sk_buff *skb, const struct tc_action *a, @@ -163,7 +162,6 @@ nla_put_failure: static struct tc_action_ops act_simp_ops = { .kind = "simple", - .hinfo = &simp_hash_info, .type = TCA_ACT_SIMP, .owner = THIS_MODULE, .act = tcf_simp, @@ -178,23 +176,15 @@ MODULE_LICENSE("GPL"); static int __init simp_init_module(void) { - int err, ret; - err = tcf_hashinfo_init(&simp_hash_info, SIMP_TAB_MASK); - if (err) - return err; - - ret = tcf_register_action(&act_simp_ops); + int ret; + ret = tcf_register_action(&act_simp_ops, SIMP_TAB_MASK); if (!ret) pr_info("Simple TC action Loaded\n"); - else - tcf_hashinfo_destroy(&simp_hash_info); - return ret; } static void __exit simp_cleanup_module(void) { - tcf_hashinfo_destroy(&simp_hash_info); tcf_unregister_action(&act_simp_ops); } |