summaryrefslogtreecommitdiffstats
path: root/net/wimax/op-reset.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-11-14 17:14:42 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-14 17:10:40 -0500
commitb61a5eea5904198d45e775c342be010a23decbe3 (patch)
tree1b1a6b78601a8d414a46344e1f3ef9ab5fae510e /net/wimax/op-reset.c
parent1c582d915da13ca21ad375ae04ec1bd6193418b2 (diff)
downloadop-kernel-dev-b61a5eea5904198d45e775c342be010a23decbe3.zip
op-kernel-dev-b61a5eea5904198d45e775c342be010a23decbe3.tar.gz
wimax: use genl_register_family_with_ops()
This simplifies the code since there's no longer a need to have error handling in the registration. Unfortunately it means more extern function declarations are needed, but the overall goal would seem to justify this. Due to the removal of duplication in the netlink policies, this reduces the size of wimax by almost 1k. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wimax/op-reset.c')
-rw-r--r--net/wimax/op-reset.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/net/wimax/op-reset.c b/net/wimax/op-reset.c
index 7ceffe3..eb45807 100644
--- a/net/wimax/op-reset.c
+++ b/net/wimax/op-reset.c
@@ -92,13 +92,6 @@ int wimax_reset(struct wimax_dev *wimax_dev)
EXPORT_SYMBOL(wimax_reset);
-static const struct nla_policy wimax_gnl_reset_policy[WIMAX_GNL_ATTR_MAX + 1] = {
- [WIMAX_GNL_RESET_IFIDX] = {
- .type = NLA_U32,
- },
-};
-
-
/*
* Exporting to user space over generic netlink
*
@@ -106,7 +99,6 @@ static const struct nla_policy wimax_gnl_reset_policy[WIMAX_GNL_ATTR_MAX + 1] =
*
* No attributes.
*/
-static
int wimax_gnl_doit_reset(struct sk_buff *skb, struct genl_info *info)
{
int result, ifindex;
@@ -130,12 +122,3 @@ error_no_wimax_dev:
d_fnend(3, NULL, "(skb %p info %p) = %d\n", skb, info, result);
return result;
}
-
-
-struct genl_ops wimax_gnl_reset = {
- .cmd = WIMAX_GNL_OP_RESET,
- .flags = GENL_ADMIN_PERM,
- .policy = wimax_gnl_reset_policy,
- .doit = wimax_gnl_doit_reset,
- .dumpit = NULL,
-};
OpenPOWER on IntegriCloud