From patchwork Fri Apr 10 03:29:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25829 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 26CFADE1FA for ; Fri, 10 Apr 2009 13:29:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932756AbZDJD3p (ORCPT ); Thu, 9 Apr 2009 23:29:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1765716AbZDJD3o (ORCPT ); Thu, 9 Apr 2009 23:29:44 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:60644 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761929AbZDJD3n (ORCPT ); Thu, 9 Apr 2009 23:29:43 -0400 Received: by fg-out-1718.google.com with SMTP id e12so282026fga.17 for ; Thu, 09 Apr 2009 20:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=/c3WVnsw+SBA1N6R/R0FqwNhR+M70yX8G9E8kMs/Eu0=; b=D/Sbk/V2aoJrVwByLpyS8uINn2+eHk7dvxwx4m3cZUNwihciF5ZdRQ2Yt8a2r7QT+B dz2j6GJbWKJX3dL1f4HgZ/xQkCFLxqmNxrnIZ3Xt729fuFVSTgIECogyFpCqpIQblYj3 eByon+iRU63/HD2VdONClGs36gTpirKxLRmbk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=U5TCrVIxHVKKBnfGq2ANx5kbVjd82DUIzBuYrUIg8kOLX8gYi/bVwWxYkLlYjZjd+D QqwCDerEFQvcYPNAGyx/jPAWuKqyy7ENEvOfQIbdOr98Ls8J8fnff4X0suU1hgBq5VxA KIgjnXtFxGbXNs4Weoqc4mLdfrPaVvVnrHuz0= Received: by 10.86.3.4 with SMTP id 4mr2265953fgc.66.1239334181980; Thu, 09 Apr 2009 20:29:41 -0700 (PDT) Received: from orion (ppp91-78-23-81.pppoe.mtu-net.ru [91.78.23.81]) by mx.google.com with ESMTPS id 3sm1075941fge.24.2009.04.09.20.29.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Apr 2009 20:29:41 -0700 (PDT) Date: Fri, 10 Apr 2009 07:29:38 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk Subject: [PATCH 6/6] ether3: convert to net_device_ops Message-ID: <20090410032938.GD29233@orion> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Alexander Beregalov --- drivers/net/arm/ether3.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c index 21a7bef..ec8a1ae 100644 --- a/drivers/net/arm/ether3.c +++ b/drivers/net/arm/ether3.c @@ -770,6 +770,18 @@ static void __devinit ether3_banner(void) printk(KERN_INFO "%s", version); } +static const struct net_device_ops ether3_netdev_ops = { + .ndo_open = ether3_open, + .ndo_stop = ether3_close, + .ndo_start_xmit = ether3_sendpacket, + .ndo_get_stats = ether3_getstats, + .ndo_set_multicast_list = ether3_setmulticastlist, + .ndo_tx_timeout = ether3_timeout, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; + static int __devinit ether3_probe(struct expansion_card *ec, const struct ecard_id *id) { @@ -846,12 +858,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id) goto free; } - dev->open = ether3_open; - dev->stop = ether3_close; - dev->hard_start_xmit = ether3_sendpacket; - dev->get_stats = ether3_getstats; - dev->set_multicast_list = ether3_setmulticastlist; - dev->tx_timeout = ether3_timeout; + dev->netdev_ops = ðer3_netdev_ops; dev->watchdog_timeo = 5 * HZ / 100; ret = register_netdev(dev);