From patchwork Thu Jul 10 08:17:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gundersen X-Patchwork-Id: 368519 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 61E321400DD for ; Thu, 10 Jul 2014 18:26:29 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752764AbaGJIYr (ORCPT ); Thu, 10 Jul 2014 04:24:47 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:35834 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752221AbaGJISn (ORCPT ); Thu, 10 Jul 2014 04:18:43 -0400 Received: by mail-lb0-f182.google.com with SMTP id c11so5884933lbj.27 for ; Thu, 10 Jul 2014 01:18:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bon0u7HISRPlKUhWFInl/GXaTBpP4JzPA1yPDzQBkh0=; b=crZZOItbIP398MU7xrx8eMxC7oux7QoRR44AmfXAPKFemCvjvJjL6LfJEmJLLbnpd9 ONRXI0ZJdaLWJ54CI6lBVZUgK+GGpSUayu1K6PQrowfyYwBctlamtSyEFP8o7DYI1f2t TatbA0aeBwpzN0EjS+1sy0i9V2ugZ1xSx7yls/iM+veTWMo4V4Cmro9IYwu1/VQ6ozBW CU2BD0Vppf1pRRmm1aI6CWOLa7HwE0eBBSO2R3tjWK/RZM875B4hMG1uG6VqVzsRufLp f2hzfpdL20gENlmCLpdx4ltuFJXMWd52smWZSnaVbsVcdv3IKpcf4f+f2jFv3ARVWOH5 /p0w== X-Gm-Message-State: ALoCoQntJmMh/oO7Ydybvo3r6Ba2uE5MM3K4UWoguMKwH+ns9205JL/7hW+/bXHrYViWiZJZx04F X-Received: by 10.112.166.34 with SMTP id zd2mr2885325lbb.35.1404980321940; Thu, 10 Jul 2014 01:18:41 -0700 (PDT) Received: from localhost.localdomain (m188-149-105-114.cust.tele2.no. [188.149.105.114]) by mx.google.com with ESMTPSA id tg1sm37154793lbb.11.2014.07.10.01.18.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jul 2014 01:18:41 -0700 (PDT) From: Tom Gundersen To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, David Miller , David Herrmann , Kay Sievers , Tom Gundersen , Samuel Ortiz , Dragos Foianu Subject: [PATCH v7 20/33] net: irlan - set name assign type Date: Thu, 10 Jul 2014 10:17:25 +0200 Message-Id: <1404980258-30853-21-git-send-email-teg@jklm.no> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1404980258-30853-1-git-send-email-teg@jklm.no> References: <1404980258-30853-1-git-send-email-teg@jklm.no> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Tom Gundersen Cc: Samuel Ortiz Cc: Dragos Foianu --- include/net/irda/irlan_eth.h | 2 +- net/irda/irlan/irlan_common.c | 2 +- net/irda/irlan/irlan_eth.c | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/net/irda/irlan_eth.h b/include/net/irda/irlan_eth.h index de5c816..00fd2f8 100644 --- a/include/net/irda/irlan_eth.h +++ b/include/net/irda/irlan_eth.h @@ -25,7 +25,7 @@ #ifndef IRLAN_ETH_H #define IRLAN_ETH_H -struct net_device *alloc_irlandev(const char *name); +struct net_device *alloc_irlandev(const char *name, unsigned char name_assign_type); int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb); void irlan_eth_flow_indication( void *instance, void *sap, LOCAL_FLOW flow); diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index 7ac4d1b..5a458b0 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c @@ -204,7 +204,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) IRDA_DEBUG(2, "%s()\n", __func__ ); /* Create network device with irlan */ - dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); + dev = alloc_irlandev(eth ? "eth%d" : "irlan%d", NET_NAME_ENUM); if (!dev) return NULL; diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c index dc13f1a..b62a822 100644 --- a/net/irda/irlan/irlan_eth.c +++ b/net/irda/irlan/irlan_eth.c @@ -94,10 +94,11 @@ static void irlan_eth_setup(struct net_device *dev) * Allocate network device and control block * */ -struct net_device *alloc_irlandev(const char *name) +struct net_device *alloc_irlandev(const char *name, + unsigned char name_assign_type) { - return alloc_netdev(sizeof(struct irlan_cb), name, NET_NAME_UNKNOWN, - irlan_eth_setup); + return alloc_netdev(sizeof(struct irlan_cb), name, + name_assign_type, irlan_eth_setup); } /*