[PATCH 15/21] ARCNET: capmode: remove extra function and use C99 in struct

From: Michael Grzeschik
Date: Fri Apr 24 2015 - 13:29:07 EST


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@xxxxxxxxxxxxxx>
---
drivers/net/arcnet/capmode.c | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
index b6868a2..91ec9fa 100644
--- a/drivers/net/arcnet/capmode.c
+++ b/drivers/net/arcnet/capmode.c
@@ -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;
}

--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/