From patchwork Fri Apr 10 03:28:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25828 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 9C52ADE1FA for ; Fri, 10 Apr 2009 13:29:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935492AbZDJD3D (ORCPT ); Thu, 9 Apr 2009 23:29:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935250AbZDJD3B (ORCPT ); Thu, 9 Apr 2009 23:29:01 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:61783 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935097AbZDJD3A (ORCPT ); Thu, 9 Apr 2009 23:29:00 -0400 Received: by fg-out-1718.google.com with SMTP id 16so781889fgg.17 for ; Thu, 09 Apr 2009 20:28:58 -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=0bOkSpEJPu+p3s32d3Qdk1bxDDCR5i4qSI1SUH8Yyds=; b=ueKegg8znef0IwapnobDyDChBCp8n5U2hReR6sGOPw6N5PoP/C9HJDv6gHl2z8K7UZ DbcRUBU4iKE+aT7FWGMZgsDhozDe2+/swXeYyZmW2VBA51j91cDUcOlNUQPOaMdOxP7M SG+yXU88NFwJahGIazugZ1dIpkb4u5wdm5c4c= 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=gUTBUZHTeZg1uiWK6tYFLQkFsA5migIb8yfh8BAxoKwDS9sa5Iut+8KMY6pYrajfk3 HMbF6oa3ndJrDrZkM0hJVVuPP1Kq3vfTCRjFY7AeIdAqlo+c5PUzkRByKqvGhtav08K+ RsN/NAlZQkI8ohpcoVMUOJn7ngFXF5s8uCf48= Received: by 10.86.61.13 with SMTP id j13mr2243335fga.68.1239334138420; Thu, 09 Apr 2009 20:28:58 -0700 (PDT) Received: from orion ([91.78.23.81]) by mx.google.com with ESMTPS id 12sm1581100fgg.12.2009.04.09.20.28.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Apr 2009 20:28:58 -0700 (PDT) Date: Fri, 10 Apr 2009 07:28:55 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk Subject: [PATCH 5/6] ether1: convert to net_device_ops Message-ID: <20090410032855.GC29233@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/ether1.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/ether1.c b/drivers/net/arm/ether1.c index e380de4..edf770f 100644 --- a/drivers/net/arm/ether1.c +++ b/drivers/net/arm/ether1.c @@ -991,6 +991,18 @@ static void __devinit ether1_banner(void) printk(KERN_INFO "%s", version); } +static const struct net_device_ops ether1_netdev_ops = { + .ndo_open = ether1_open, + .ndo_stop = ether1_close, + .ndo_start_xmit = ether1_sendpacket, + .ndo_get_stats = ether1_getstats, + .ndo_set_multicast_list = ether1_setmulticastlist, + .ndo_tx_timeout = ether1_timeout, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, +}; + static int __devinit ether1_probe(struct expansion_card *ec, const struct ecard_id *id) { @@ -1031,12 +1043,7 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) goto free; } - dev->open = ether1_open; - dev->stop = ether1_close; - dev->hard_start_xmit = ether1_sendpacket; - dev->get_stats = ether1_getstats; - dev->set_multicast_list = ether1_setmulticastlist; - dev->tx_timeout = ether1_timeout; + dev->netdev_ops = ðer1_netdev_ops; dev->watchdog_timeo = 5 * HZ / 100; ret = register_netdev(dev);