From patchwork Sat Apr 11 17:39:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25858 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 22F5ADE255 for ; Sun, 12 Apr 2009 03:40:12 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756874AbZDKRkH (ORCPT ); Sat, 11 Apr 2009 13:40:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755188AbZDKRkG (ORCPT ); Sat, 11 Apr 2009 13:40:06 -0400 Received: from qw-out-2122.google.com ([74.125.92.24]:25859 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754734AbZDKRkE (ORCPT ); Sat, 11 Apr 2009 13:40:04 -0400 Received: by qw-out-2122.google.com with SMTP id 8so1787466qwh.37 for ; Sat, 11 Apr 2009 10:40:03 -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:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=27PmvC7St4NeFVcO6xngToGfNbDwwUgbxK1Hq7I9Whc=; b=jv4Erqzk9OgUd/oLqS2thWj8CLPJqnb2JC0t/3yqgCDCLTN5yL6x4EwSMbqUvIzLyz DBEC5iu1iDjboUzBkt5Dgg5eLMFHB3Lf6EBb9PZFoy3oZQf3A6POKowSRkYbAUDGH3yJ rIfoXroa8x+DJr3K2peoc3pQzFZOsvx78oZSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=J/tehAe4GKJy2n33E09Ws3JA0QDEpYWq4p6K0sSh1c/xz8fVnEjBWBokXwJ6mith2G wLB131P/5Qigt/im6lbrhzimJJFoPz7sVXlStDmaFuP1QRmQghIy612rqu6OJhya4r6F NKhJ2SzagKE1kGG5i7o93gzwa2Rpfhw0amUzc= Received: by 10.220.86.129 with SMTP id s1mr2675487vcl.109.1239471603593; Sat, 11 Apr 2009 10:40:03 -0700 (PDT) Received: from orion ([91.78.156.47]) by mx.google.com with ESMTPS id 6sm4809783ywn.2.2009.04.11.10.40.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Apr 2009 10:40:02 -0700 (PDT) Date: Sat, 11 Apr 2009 21:39:58 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org Subject: [PATCH 04/11] sun3_82586: convert to net_device_ops Message-ID: <20090411173958.GD16999@orion> References: <20090411173019.GA16999@orion> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090411173019.GA16999@orion> 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/sun3_82586.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/sun3_82586.c b/drivers/net/sun3_82586.c index e0d8477..a39c0b9 100644 --- a/drivers/net/sun3_82586.c +++ b/drivers/net/sun3_82586.c @@ -331,6 +331,18 @@ out: return ERR_PTR(err); } +static const struct net_device_ops sun3_82586_netdev_ops = { + .ndo_open = sun3_82586_open, + .ndo_stop = sun3_82586_close, + .ndo_start_xmit = sun3_82586_send_packet, + .ndo_set_multicast_list = set_multicast_list, + .ndo_tx_timeout = sun3_82586_timeout, + .ndo_get_stats = sun3_82586_get_stats, + .ndo_validate_addr = eth_validate_addr, + .ndo_set_mac_address = eth_mac_addr, + .ndo_change_mtu = eth_change_mtu, +}; + static int __init sun3_82586_probe1(struct net_device *dev,int ioaddr) { int i, size, retval; @@ -381,13 +393,8 @@ static int __init sun3_82586_probe1(struct net_device *dev,int ioaddr) printk("Memaddr: 0x%lx, Memsize: %d, IRQ %d\n",dev->mem_start,size, dev->irq); - dev->open = sun3_82586_open; - dev->stop = sun3_82586_close; - dev->get_stats = sun3_82586_get_stats; - dev->tx_timeout = sun3_82586_timeout; + dev->netdev_ops = &sun3_82586_netdev_ops; dev->watchdog_timeo = HZ/20; - dev->hard_start_xmit = sun3_82586_send_packet; - dev->set_multicast_list = set_multicast_list; dev->if_port = 0; return 0;