Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031873AbbDXR2r (ORCPT ); Fri, 24 Apr 2015 13:28:47 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:44271 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031527AbbDXRWV (ORCPT ); Fri, 24 Apr 2015 13:22:21 -0400 From: Michael Grzeschik To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 15/21] ARCNET: capmode: remove extra function and use C99 in struct Date: Fri, 24 Apr 2015 19:20:49 +0200 Message-Id: <1429896055-31680-16-git-send-email-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1429896055-31680-1-git-send-email-m.grzeschik@pengutronix.de> References: <1429896055-31680-1-git-send-email-m.grzeschik@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 68 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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/