@@ -229,22 +229,22 @@ free_outskb:
return 0;
}
-static struct ArcProto capmode_proto =
-{
- 'r',
- XMTU,
- 0,
- rx,
- build_header,
- prepare_tx,
- NULL,
- ack_tx
+static struct ArcProto capmode_proto = {
+ .suffix = 'r',
+ .mtu = XMTU,
+ .rx = rx,
+ .build_header = build_header,
+ .prepare_tx = prepare_tx,
+ .continue_tx = NULL,
+ .ack_tx = ack_tx
};
-static void arcnet_cap_init(void)
+static int __init capmode_module_init(void)
{
int count;
+ pr_info(VERSION);
+
for (count = 1; count <= 8; count++)
if (arc_proto_map[count] == arc_proto_default)
arc_proto_map[count] = &capmode_proto;
@@ -255,12 +255,6 @@ static void arcnet_cap_init(void)
arc_proto_default = &capmode_proto;
arc_raw_proto = &capmode_proto;
-}
-
-static int __init capmode_module_init(void)
-{
- printk(VERSION);
- arcnet_cap_init();
return 0;
}
This patch cleans the capmode protocol module. It removes the obsolete function arcnet_cap_init and uses the C99 struct definition. It also replaces printk with pr_info. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> --- drivers/net/arcnet/capmode.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-)